Package com.sun.xml.ws.security.impl
Class PasswordDerivedKey
- java.lang.Object
-
- com.sun.xml.ws.security.impl.PasswordDerivedKey
-
public class PasswordDerivedKey extends Object
-
-
Constructor Summary
Constructors Constructor Description PasswordDerivedKey()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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)
-
-
-
Method Detail
-
generate160BitKey
public byte[] generate160BitKey(String password, int iteration, byte[] reqsalt) throws UnsupportedEncodingException
- Throws:
UnsupportedEncodingException
-
generate16ByteKeyforEncryption
public SecretKey generate16ByteKeyforEncryption(byte[] keyof20Bytes)
-
generateDerivedKeyforEncryption
public SecretKey generateDerivedKeyforEncryption(String password, String algorithm, int iteration) throws UnsupportedEncodingException
- Throws:
UnsupportedEncodingException
-
generateMAC
public byte[] generateMAC(byte[] data, String password, int iteration) throws InvalidKeyException, SignatureException, UnsupportedEncodingException
-
get16ByteSalt
public byte[] get16ByteSalt()
-
verifyEncryptionKey
public SecretKey verifyEncryptionKey(String password, int iterate, byte[] receivedSalt) throws UnsupportedEncodingException
- Throws:
UnsupportedEncodingException
-
verifyMACSignature
public boolean verifyMACSignature(byte[] receivedSignature, byte[] data, String password, int iterate, byte[] receivedsalt) throws UnsupportedEncodingException, InvalidKeyException, SignatureException
-
testAlgorithm
public boolean testAlgorithm(String algo)
-
-