Package org.mozilla.jss.pkcs12
Class PasswordConverter
- java.lang.Object
-
- org.mozilla.jss.pkcs12.PasswordConverter
-
- All Implemented Interfaces:
KeyGenerator.CharToByteConverter
public final class PasswordConverter extends java.lang.Object implements KeyGenerator.CharToByteConverter
Converts password chars to bytes. The output format is big-endian Unicode, with two zero bytes of null-termination at the end.
-
-
Constructor Summary
Constructors Constructor Description PasswordConverter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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)
Description copied from interface:KeyGenerator.CharToByteConverter
Converts a password of Java characters into a password of bytes, using some encoding scheme. The input char array must not be modified.- Specified by:
convert
in interfaceKeyGenerator.CharToByteConverter
- Parameters:
chars
- Password characters.- Returns:
- Password as byte array.
-
-