Package com.netscape.certsrv.util
Class CryptoProvider
java.lang.Object
com.netscape.certsrv.util.CryptoProvider
- Direct Known Subclasses:
NSSCryptoProvider
An abstract class defining the functionality to be provided by
sub classes to perform cryptographic operations.
- Author:
- akoneru
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract byte[]
encryptSecret
(byte[] secret, byte[] iv, org.mozilla.jss.crypto.SymmetricKey key, String keyAlgorithm) abstract byte[]
encryptSecret
(byte[] secret, byte[] iv, org.mozilla.jss.crypto.SymmetricKey key, org.mozilla.jss.crypto.EncryptionAlgorithm keyAlgorithm) abstract org.mozilla.jss.crypto.SymmetricKey
abstract org.mozilla.jss.crypto.SymmetricKey
generateSessionKey
(org.mozilla.jss.crypto.EncryptionAlgorithm algorithm) abstract org.mozilla.jss.crypto.SymmetricKey
generateSymmetricKey
(String keyAlgorithm, int keySize) abstract void
abstract byte[]
unwrapAsymmetricKeyWithSessionKey
(byte[] wrappedRecoveredKey, org.mozilla.jss.crypto.SymmetricKey recoveryKey, org.mozilla.jss.crypto.KeyWrapAlgorithm wrapAlgorithm, byte[] nonceData, PublicKey pubKey) abstract byte[]
unwrapSymmetricKeyWithSessionKey
(byte[] wrappedRecoveredKey, org.mozilla.jss.crypto.SymmetricKey recoveryKey, org.mozilla.jss.crypto.KeyWrapAlgorithm wrapAlgorithm, byte[] nonceData, String algorithm, int size) abstract byte[]
unwrapWithPassphrase
(byte[] wrappedRecoveredKey, String recoveryPassphrase) abstract byte[]
unwrapWithSessionKey
(byte[] wrappedRecoveredKey, org.mozilla.jss.crypto.SymmetricKey recoveryKey, String keyAlgorithm, byte[] nonceData) abstract byte[]
unwrapWithSessionKey
(byte[] wrappedRecoveredKey, org.mozilla.jss.crypto.SymmetricKey recoveryKey, org.mozilla.jss.crypto.EncryptionAlgorithm keyAlgorithm, byte[] nonceData) abstract byte[]
wrapSymmetricKey
(org.mozilla.jss.crypto.SymmetricKey symmetricKey, PublicKey wrappingKey) abstract byte[]
wrapWithSessionKey
(org.mozilla.jss.crypto.SymmetricKey secret, org.mozilla.jss.crypto.SymmetricKey sessionKey, byte[] iv) abstract byte[]
wrapWithSessionKey
(org.mozilla.jss.crypto.SymmetricKey secret, org.mozilla.jss.crypto.SymmetricKey sessionKey, byte[] iv, org.mozilla.jss.crypto.KeyWrapAlgorithm wrapAlg)
-
Constructor Details
-
CryptoProvider
public CryptoProvider()
-
-
Method Details
-
initialize
- Throws:
Exception
-
generateSymmetricKey
public abstract org.mozilla.jss.crypto.SymmetricKey generateSymmetricKey(String keyAlgorithm, int keySize) throws Exception - Throws:
Exception
-
generateSessionKey
- Throws:
Exception
-
generateSessionKey
public abstract org.mozilla.jss.crypto.SymmetricKey generateSessionKey(org.mozilla.jss.crypto.EncryptionAlgorithm algorithm) throws Exception - Throws:
Exception
-
wrapSymmetricKey
public abstract byte[] wrapSymmetricKey(org.mozilla.jss.crypto.SymmetricKey symmetricKey, PublicKey wrappingKey) throws Exception - Throws:
Exception
-
encryptSecret
public abstract byte[] encryptSecret(byte[] secret, byte[] iv, org.mozilla.jss.crypto.SymmetricKey key, String keyAlgorithm) throws Exception - Throws:
Exception
-
encryptSecret
public abstract byte[] encryptSecret(byte[] secret, byte[] iv, org.mozilla.jss.crypto.SymmetricKey key, org.mozilla.jss.crypto.EncryptionAlgorithm keyAlgorithm) throws Exception - Throws:
Exception
-
wrapWithSessionKey
public abstract byte[] wrapWithSessionKey(org.mozilla.jss.crypto.SymmetricKey secret, org.mozilla.jss.crypto.SymmetricKey sessionKey, byte[] iv) throws Exception - Throws:
Exception
-
wrapWithSessionKey
public abstract byte[] wrapWithSessionKey(org.mozilla.jss.crypto.SymmetricKey secret, org.mozilla.jss.crypto.SymmetricKey sessionKey, byte[] iv, org.mozilla.jss.crypto.KeyWrapAlgorithm wrapAlg) throws Exception - Throws:
Exception
-
unwrapWithSessionKey
public abstract byte[] unwrapWithSessionKey(byte[] wrappedRecoveredKey, org.mozilla.jss.crypto.SymmetricKey recoveryKey, String keyAlgorithm, byte[] nonceData) throws Exception - Throws:
Exception
-
unwrapWithSessionKey
public abstract byte[] unwrapWithSessionKey(byte[] wrappedRecoveredKey, org.mozilla.jss.crypto.SymmetricKey recoveryKey, org.mozilla.jss.crypto.EncryptionAlgorithm keyAlgorithm, byte[] nonceData) throws Exception - Throws:
Exception
-
unwrapWithPassphrase
public abstract byte[] unwrapWithPassphrase(byte[] wrappedRecoveredKey, String recoveryPassphrase) throws Exception - Throws:
Exception
-
unwrapSymmetricKeyWithSessionKey
public abstract byte[] unwrapSymmetricKeyWithSessionKey(byte[] wrappedRecoveredKey, org.mozilla.jss.crypto.SymmetricKey recoveryKey, org.mozilla.jss.crypto.KeyWrapAlgorithm wrapAlgorithm, byte[] nonceData, String algorithm, int size) throws Exception - Throws:
Exception
-
unwrapAsymmetricKeyWithSessionKey
public abstract byte[] unwrapAsymmetricKeyWithSessionKey(byte[] wrappedRecoveredKey, org.mozilla.jss.crypto.SymmetricKey recoveryKey, org.mozilla.jss.crypto.KeyWrapAlgorithm wrapAlgorithm, byte[] nonceData, PublicKey pubKey) throws Exception - Throws:
Exception
-