PKCS5PasswordToBytes

converts a password to a byte array according to the scheme in PKCS5 (ascii, no padding)

@safe pure nothrow
ubyte[]
PKCS5PasswordToBytes
(
in char[] password
)

Return Value

Type: ubyte[]

a byte array representing the password.

Examples

test PKCS5PasswordToUTF8Bytes

assert(PKCS5PasswordToBytes(null) == [], "PKCS5PasswordToBytes(null) failed");
assert(PKCS5PasswordToBytes(x"61415f3021") == [0x61, 0x41, 0x5f, 0x30, 0x21]);
assert(PKCS5PasswordToBytes(x"0061") == [0x00, 0x61]);

Meta