|
Oracle Fusion Middleware Crypto Java API Reference for Oracle Security Developer Tools 11g Release 1 (11.1.1) E10668-05 |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
oracle.security.crypto.core.PBE
oracle.security.crypto.core.PKCS5PBE
public final class PKCS5PBE
Class to perform password-based encryption, as defined in the PKCS#5v2 specification.
| Field Summary | |
|---|---|
static int |
MD2_DESThe MD2 with DES CBC PKCS#5 mode. |
static int |
MD2_RC2The MD2 with RC2 CBC PKCS#5 mode. |
static int |
MD5_DESThe MD5 with DES CBC PKCS#5 mode. |
static int |
MD5_RC2The MD5 with RC2 CBC PKCS#5 mode. |
static int |
SHA1_DESThe SHA1 with DES CBC PKCS#5 mode. |
static int |
SHA1_RC2The SHA1 with RC2 CBC PKCS#5 mode. |
| Fields inherited from class oracle.security.crypto.core.PBE |
|---|
algID, cipherAlgID, mdAlgID |
| Constructor Summary | |
|---|---|
PKCS5PBE()Standard contstructor. |
|
| Method Summary | |
|---|---|
byte[] |
decrypt(java.lang.String password, byte[] data)Decrypt an array of bytes, and return the decrypted array of bytes. |
PrivateKey |
decryptPrivateKey(java.lang.String password, byte[] encPrivKey)Decrypt a private key, and return the decrypted key. |
SymmetricKey |
decryptSymmetricKey(java.lang.String password, byte[] encSymKey)Decrypt a symmetric key, and return the decrypted key. |
byte[] |
encrypt(java.lang.String password, byte[] data)Encrypt an array of bytes, and return the encrypted array of bytes. |
byte[] |
encryptPrivateKey(java.lang.String password, PrivateKey privKey)Encrypt a private key, and return the encrypted key. |
byte[] |
encryptSymmetricKey(java.lang.String password, SymmetricKey symKey)Encrypt a symmetric key, and return the encrypted key. |
void |
initialize(AlgorithmIdentifier algID)Initializes this PBE instance with the specified algorithm identifier. |
void |
initialize(int mode)Initializes this PBE instance with the specified PBE parameters. |
void |
initialize(int mode, byte[] salt, int iterationCount)Initializes this PBE instance with the specified PBE parameters. |
| Methods inherited from class oracle.security.crypto.core.PBE |
|---|
getAlgID, getInstance |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int MD2_DES
public static final int MD2_RC2
public static final int MD5_DES
public static final int MD5_RC2
public static final int SHA1_DES
public static final int SHA1_RC2
| Constructor Detail |
|---|
public PKCS5PBE()
| Method Detail |
|---|
public void initialize(AlgorithmIdentifier algID)
throws AlgorithmIdentifierException
PBE instance with the specified algorithm identifier.initialize in class PBEalgID - The algorithm identifier used to initialize this PBE. It should be a instance of PBEAlgorithmIdentifier.AlgorithmIdentifierException
public void initialize(int mode,
byte[] salt,
int iterationCount)
throws AlgorithmIdentifierException
PBE instance with the specified PBE parameters.initialize in class PBEmode - The mode to use with this PBE. The mode is a PKCS5PBE mode value.salt - The salt to use during the key generation.iterationCount - The iteration count to use during the key generation.AlgorithmIdentifierException
public void initialize(int mode)
throws AlgorithmIdentifierException
PBE instance with the specified PBE parameters.initialize in class PBEmode - The mode to use with this PBE. The mode is a PKCS5PBE mode value.AlgorithmIdentifierException
public byte[] encrypt(java.lang.String password,
byte[] data)
throws CipherException
encrypt in class PBEpassword - The password to use to generate the key. The password transformed to a byte array using the US-ASCII encoding.data - The data to encrypt.CipherException
public byte[] decrypt(java.lang.String password,
byte[] data)
throws CipherException
decrypt in class PBEpassword - The password to use to generate the key. The password transformed to a byte array using the US-ASCII encoding. If the decryption fails, the local encoding is used.data - The data to decrypt.CipherException
public byte[] encryptPrivateKey(java.lang.String password,
PrivateKey privKey)
throws CipherException
encryptPrivateKey in class PBEpassword - The password to use to generate the key. The password transformed to a byte array using the US-ASCII encoding.privKey - The private key to encrypt.CipherException
public PrivateKey decryptPrivateKey(java.lang.String password,
byte[] encPrivKey)
throws CipherException,
java.io.IOException
decryptPrivateKey in class PBEpassword - The password to use to generate the key. The password transformed to a byte array using the US-ASCII encoding. If the decryption fails, the local encoding is used.encPrivKey - The byte array containing the encrypted private key.CipherExceptionjava.io.IOException
public byte[] encryptSymmetricKey(java.lang.String password,
SymmetricKey symKey)
throws CipherException
encryptSymmetricKey in class PBEpassword - The password to use to generate the key. The password transformed to a byte array using the US-ASCII encoding.symKey - The symmetric key to encrypt.CipherException
public SymmetricKey decryptSymmetricKey(java.lang.String password,
byte[] encSymKey)
throws CipherException
decryptSymmetricKey in class PBEpassword - The password to use to generate the key. The password transformed to a byte array using the US-ASCII encoding. If the decryption fails, the local encoding is used.encSymKey - The byte array containing the encrypted symmetric key.CipherException
|
Oracle Fusion Middleware Crypto Java API Reference for Oracle Security Developer Tools 11g Release 1 (11.1.1) E10668-05 |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||