You are currently viewing a snapshot of www.mozilla.org taken on April 21, 2008. Most of this content is highly out of date (some pages haven't been updated since the project began in 1998) and exists for historical purposes only. If there are any pages on this archive site that you think should be added back to www.mozilla.org, please file a bug.




org.mozilla.jss.crypto
Interface KeyGenerator.CharToByteConverter

All Known Implementing Classes:
PasswordConverter
Enclosing interface:
KeyGenerator

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

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

Throws:
java.io.CharConversionException