public class PasswordDerivedKey extends Object
| Constructor and Description |
|---|
PasswordDerivedKey() |
| Modifier and Type | Method and Description |
|---|---|
byte[] |
generate160BitKey(String password,
int iteration,
byte[] reqsalt) |
SecretKey |
generate16ByteKeyforEncryption(byte[] keyof20Bytes) |
SecretKey |
generateDerivedKeyforEncryption(String password,
String algorithm,
int iteration) |
byte[] |
generateMAC(byte[] data,
String password,
int iteration) |
byte[] |
get16ByteSalt() |
boolean |
testAlgorithm(String algo) |
SecretKey |
verifyEncryptionKey(String password,
int iterate,
byte[] receivedSalt) |
boolean |
verifyMACSignature(byte[] receivedSignature,
byte[] data,
String password,
int iterate,
byte[] receivedsalt) |
public byte[] generate160BitKey(String password, int iteration, byte[] reqsalt) throws UnsupportedEncodingException
UnsupportedEncodingExceptionpublic SecretKey generate16ByteKeyforEncryption(byte[] keyof20Bytes)
public SecretKey generateDerivedKeyforEncryption(String password, String algorithm, int iteration) throws UnsupportedEncodingException
UnsupportedEncodingExceptionpublic byte[] generateMAC(byte[] data,
String password,
int iteration)
throws InvalidKeyException,
SignatureException,
UnsupportedEncodingException
public byte[] get16ByteSalt()
public SecretKey verifyEncryptionKey(String password, int iterate, byte[] receivedSalt) throws UnsupportedEncodingException
UnsupportedEncodingExceptionpublic boolean verifyMACSignature(byte[] receivedSignature,
byte[] data,
String password,
int iterate,
byte[] receivedsalt)
throws UnsupportedEncodingException,
InvalidKeyException,
SignatureException
public boolean testAlgorithm(String algo)
Copyright © 2005–2018 Oracle Corporation. All rights reserved.