Skip to content

DFSEC_DecodeExUC

Include: Use System\Security.pkg

See Also: Encoding, DFSEC_EncodeEx

Purpose

Decodes a byte range addressed by a pointer and returns decoded bytes.

Syntax

Function DFSEC_DecodeExUC Global DFSEC_ENCODING_FORMAT eFormat Pointer pValue ULongptr ulSize Returns UChar[]

Arguments

eFormat : Encoding format. Use one of the C_DFSEC_ENCODING_* constants.

pValue : Pointer to the first byte to decode.

ulSize : Number of bytes to read starting at pValue.

Returns

Decoded bytes as UChar[].

Behavior

DFSEC_DecodeExUC operates on exactly ulSize bytes starting at pValue and returns the result as UChar[].

Invalid format, null or empty pointer, or zero or empty size raises DFERR_BAD_PARAMETER.

Advanced: pointer input

Use DFSEC_DecodeExUC only when the source data already exists in addressable memory. Otherwise prefer the regular String and UChar[] APIs.

Example

String sValue
UChar[] ucaResult
Pointer pValue

Move "RGF0YUZsZXg=" to sValue
Move (AddressOf(sValue)) to pValue
Get DFSEC_DecodeExUC C_DFSEC_ENCODING_BASE64 pValue (SizeOfString(sValue)) to ucaResult