| java.lang.Object snow.crypto.SecretKeyUtilities
SecretKeyUtilities | final public class SecretKeyUtilities (Code) | | |
computeSignature | public static SecretKeyID computeSignature(SecretKey key)(Code) | | take the 4 first bytes (24 bits) of the hash of the pass
|
generateKeyFromPassphrase | public static SecretKey generateKeyFromPassphrase(byte[] pass, int length_in_bytes) throws Exception(Code) | | take the first length_in_bytes bytes (*8 = bits) of the sha-1 hash of pass
WARNING: this is really secret, rehash it to generate a signature
Parameters: length_in_bytes - up to 16 (64 bits) can be used without restrictionslength_in_bytes>16 requires the unrestricted jce policy (download it from sun)make no sense up to 160 bits (20 bytes) because of the use of sha-1 |
|
|