DFSEC_EncodeExUC¶
Include: Use System\Security.pkg
See Also: Encoding, DFSEC_DecodeEx
Purpose¶
Encodes a byte range addressed by a pointer and returns encoded bytes.
Syntax¶
Function DFSEC_EncodeExUC 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 encode.
ulSize
: Number of bytes to read starting at pValue.
Returns¶
Encoded bytes as UChar[].
Behavior¶
DFSEC_EncodeExUC 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_EncodeExUC 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 "DataFlex" to sValue
Move (AddressOf(sValue)) to pValue
Get DFSEC_EncodeExUC C_DFSEC_ENCODING_BASE64 pValue (SizeOfString(sValue)) to ucaResult