com.sun.xml.ws.security.impl
Class PasswordDerivedKey

java.lang.Object
  extended by com.sun.xml.ws.security.impl.PasswordDerivedKey

public class PasswordDerivedKey
extends java.lang.Object


Constructor Summary
PasswordDerivedKey()
           
 
Method Summary
 byte[] generate160BitKey(java.lang.String password, int iteration, byte[] reqsalt)
           
 javax.crypto.SecretKey generate16ByteKeyforEncryption(byte[] keyof20Bytes)
           
 javax.crypto.SecretKey generateDerivedKeyforEncryption(java.lang.String password, java.lang.String algorithm, int iteration)
           
 byte[] generateMAC(byte[] data, java.lang.String password, int iteration)
           
 byte[] get16ByteSalt()
           
 boolean testAlgorithm(java.lang.String algo)
           
 javax.crypto.SecretKey verifyEncryptionKey(java.lang.String password, int iterate, byte[] receivedSalt)
           
 boolean verifyMACSignature(byte[] receivedSignature, byte[] data, java.lang.String password, int iterate, byte[] receivedsalt)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PasswordDerivedKey

public PasswordDerivedKey()
Method Detail

generate160BitKey

public byte[] generate160BitKey(java.lang.String password,
                                int iteration,
                                byte[] reqsalt)
                         throws java.io.UnsupportedEncodingException
Throws:
java.io.UnsupportedEncodingException

generate16ByteKeyforEncryption

public javax.crypto.SecretKey generate16ByteKeyforEncryption(byte[] keyof20Bytes)

generateDerivedKeyforEncryption

public javax.crypto.SecretKey generateDerivedKeyforEncryption(java.lang.String password,
                                                              java.lang.String algorithm,
                                                              int iteration)
                                                       throws java.io.UnsupportedEncodingException
Throws:
java.io.UnsupportedEncodingException

generateMAC

public byte[] generateMAC(byte[] data,
                          java.lang.String password,
                          int iteration)
                   throws java.security.InvalidKeyException,
                          java.security.SignatureException,
                          java.io.UnsupportedEncodingException
Throws:
java.security.InvalidKeyException
java.security.SignatureException
java.io.UnsupportedEncodingException

get16ByteSalt

public byte[] get16ByteSalt()

verifyEncryptionKey

public javax.crypto.SecretKey verifyEncryptionKey(java.lang.String password,
                                                  int iterate,
                                                  byte[] receivedSalt)
                                           throws java.io.UnsupportedEncodingException
Throws:
java.io.UnsupportedEncodingException

verifyMACSignature

public boolean verifyMACSignature(byte[] receivedSignature,
                                  byte[] data,
                                  java.lang.String password,
                                  int iterate,
                                  byte[] receivedsalt)
                           throws java.io.UnsupportedEncodingException,
                                  java.security.InvalidKeyException,
                                  java.security.SignatureException
Throws:
java.io.UnsupportedEncodingException
java.security.InvalidKeyException
java.security.SignatureException

testAlgorithm

public boolean testAlgorithm(java.lang.String algo)


Copyright © 2005-2011 Oracle Corporation. All Rights Reserved.