Convert a UTF-8 string to PKCS#12 BMPString form (big-endian UTF-16).
Declared in <openssl/pkcs12.h>
unsigned char*
OPENSSL_utf82uni(
char const* asc,
int asclen,
unsigned char** uni,
int* unilen);
Pointer to the BMPString (same as *uni), or NULL on error. Falls back to OPENSSL_asc2uni() if asc is not valid UTF-8.
| Name | Description |
|---|---|
| asc | UTF-8 input string. |
| asclen | Length of asc in bytes, or -1 to use strlen(). |
| uni | Address of pointer updated to the allocated BMPString buffer. |
| unilen | Address to receive BMPString length in bytes. |