Save This Page
Home » openjdk-7 » com.sun.crypto » provider » [javadoc | source]
final class: KeyProtector [javadoc | source]
This class implements a protection mechanism for private keys. In JCE, we use a stronger protection mechanism than in the JDK, because we can use the Cipher class. Private keys are protected using the JCE mechanism, and are recovered using either the JDK or JCE mechanism, depending on how the key has been protected. This allows us to parse Sun's keystore implementation that ships with JDK 1.2.
 KeyProtector(char[] password) 
Method from com.sun.crypto.provider.KeyProtector Summary:
protect,   recover,   seal,   unseal
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from com.sun.crypto.provider.KeyProtector Detail:
 byte[] protect(PrivateKey key) throws Exception 
    Protects the given cleartext private key, using the password provided at construction time.
 Key recover(EncryptedPrivateKeyInfo encrInfo) throws UnrecoverableKeyException, NoSuchAlgorithmException 
 SealedObject seal(Key key) throws Exception 
    Seals the given cleartext key, using the password provided at construction time
 Key unseal(SealedObject so) throws NoSuchAlgorithmException, UnrecoverableKeyException 
    Unseals the sealed key.