org.mozilla.jss.crypto

Interface KeyGenerator.CharToByteConverter

public static interface KeyGenerator.CharToByteConverter

An interface for converting a password of Java characters into an array of bytes. This conversion must be performed to provide a byte array to the low-level crypto engine. The default conversion is UTF8. Null-termination is not necessary, and indeed is usually incorrect, since the password is passed to the crypto engine as a byte array, not a C string.
Method Summary
byte[]convert(char[] chars)
Converts a password of Java characters into a password of bytes, using some encoding scheme.

Method Detail

convert

public byte[] convert(char[] chars)
Converts a password of Java characters into a password of bytes, using some encoding scheme. The input char array must not be modified.