org.bouncycastle.openpgp.operator
Class PBESecretKeyEncryptor
java.lang.Object
|
+--org.bouncycastle.openpgp.operator.PBESecretKeyEncryptor
- public abstract class PBESecretKeyEncryptor
- extends java.lang.Object
Constructor Summary |
protected |
PBESecretKeyEncryptor(int encAlgorithm,
int aeadAlgorithm,
S2K.Argon2Params argon2Params,
java.security.SecureRandom random,
char[] passPhrase)
|
protected |
PBESecretKeyEncryptor(int encAlgorithm,
PGPDigestCalculator s2kDigestCalculator,
int s2kCount,
java.security.SecureRandom random,
char[] passPhrase)
|
protected |
PBESecretKeyEncryptor(int encAlgorithm,
PGPDigestCalculator s2kDigestCalculator,
java.security.SecureRandom random,
char[] passPhrase)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
encAlgorithm
protected int encAlgorithm
aeadAlgorithm
protected int aeadAlgorithm
passPhrase
protected char[] passPhrase
s2kDigestCalculator
protected PGPDigestCalculator s2kDigestCalculator
s2kCount
protected int s2kCount
s2k
protected S2K s2k
random
protected java.security.SecureRandom random
PBESecretKeyEncryptor
protected PBESecretKeyEncryptor(int encAlgorithm,
int aeadAlgorithm,
S2K.Argon2Params argon2Params,
java.security.SecureRandom random,
char[] passPhrase)
PBESecretKeyEncryptor
protected PBESecretKeyEncryptor(int encAlgorithm,
PGPDigestCalculator s2kDigestCalculator,
java.security.SecureRandom random,
char[] passPhrase)
PBESecretKeyEncryptor
protected PBESecretKeyEncryptor(int encAlgorithm,
PGPDigestCalculator s2kDigestCalculator,
int s2kCount,
java.security.SecureRandom random,
char[] passPhrase)
getAlgorithm
public int getAlgorithm()
getAeadAlgorithm
public int getAeadAlgorithm()
getHashAlgorithm
public int getHashAlgorithm()
getKey
public byte[] getKey()
throws PGPException
getS2K
public S2K getS2K()
encryptKeyData
public byte[] encryptKeyData(byte[] keyData,
int keyOff,
int keyLen)
throws PGPException
- Key encryption method invoked for V4 keys and greater.
- Parameters:
keyData
- raw key datakeyOff
- offset into raw key datakeyLen
- length of key data to use.- Returns:
- an encryption of the passed in keyData.
- Throws:
PGPException
- on error in the underlying encryption process.
encryptKeyData
public abstract byte[] encryptKeyData(byte[] key,
byte[] keyData,
int keyOff,
int keyLen)
throws PGPException
encryptKeyData
public byte[] encryptKeyData(byte[] key,
byte[] iv,
byte[] keyData,
int keyOff,
int keyLen)
throws PGPException
- Encrypt the passed in keyData using the key and the iv provided.
This method is only used for processing version 3 keys.
getCipherIV
public abstract byte[] getCipherIV()