|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.bouncycastle.openpgp.PGPSecretKey
general class to handle a PGP secret key object.
Constructor Summary | |
PGPSecretKey(int certificationLevel,
int algorithm,
java.security.PublicKey pubKey,
java.security.PrivateKey privKey,
java.util.Date time,
java.lang.String id,
int encAlgorithm,
char[] passPhrase,
boolean useSHA1,
PGPSignatureSubpacketVector hashedPcks,
PGPSignatureSubpacketVector unhashedPcks,
java.security.SecureRandom rand,
java.lang.String provider)
|
|
PGPSecretKey(int certificationLevel,
int algorithm,
java.security.PublicKey pubKey,
java.security.PrivateKey privKey,
java.util.Date time,
java.lang.String id,
int encAlgorithm,
char[] passPhrase,
PGPSignatureSubpacketVector hashedPcks,
PGPSignatureSubpacketVector unhashedPcks,
java.security.SecureRandom rand,
java.lang.String provider)
|
|
PGPSecretKey(int certificationLevel,
PGPKeyPair keyPair,
java.lang.String id,
int encAlgorithm,
char[] passPhrase,
boolean useSHA1,
PGPSignatureSubpacketVector hashedPcks,
PGPSignatureSubpacketVector unhashedPcks,
java.security.SecureRandom rand,
java.lang.String provider)
|
|
PGPSecretKey(int certificationLevel,
PGPKeyPair keyPair,
java.lang.String id,
int encAlgorithm,
char[] passPhrase,
PGPSignatureSubpacketVector hashedPcks,
PGPSignatureSubpacketVector unhashedPcks,
java.security.SecureRandom rand,
java.lang.String provider)
|
Method Summary | |
static PGPSecretKey |
copyWithNewPassword(PGPSecretKey key,
char[] oldPassPhrase,
char[] newPassPhrase,
int newEncAlgorithm,
java.security.SecureRandom rand,
java.lang.String provider)
Return a copy of the passed in secret key, encrypted using a new password and the passed in algorithm. |
void |
encode(java.io.OutputStream outStream)
|
PGPPrivateKey |
extractPrivateKey(char[] passPhrase,
java.lang.String provider)
Extract a PGPPrivate key from the SecretKey's encrypted contents. |
byte[] |
getEncoded()
|
int |
getKeyEncryptionAlgorithm()
return the algorithm the key is encrypted with. |
long |
getKeyID()
Return the keyID of the public key associated with this key. |
PGPPublicKey |
getPublicKey()
Return the public key associated with this key. |
java.util.Iterator |
getUserAttributes()
Return any user attribute vectors associated with the key. |
java.util.Iterator |
getUserIDs()
Return any userIDs associated with the key. |
boolean |
isMasterKey()
Return true if this is a master key. |
boolean |
isSigningKey()
return true if this key is marked as suitable for signature generation. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public PGPSecretKey(int certificationLevel, PGPKeyPair keyPair, java.lang.String id, int encAlgorithm, char[] passPhrase, PGPSignatureSubpacketVector hashedPcks, PGPSignatureSubpacketVector unhashedPcks, java.security.SecureRandom rand, java.lang.String provider) throws PGPException, java.security.NoSuchProviderException
public PGPSecretKey(int certificationLevel, PGPKeyPair keyPair, java.lang.String id, int encAlgorithm, char[] passPhrase, boolean useSHA1, PGPSignatureSubpacketVector hashedPcks, PGPSignatureSubpacketVector unhashedPcks, java.security.SecureRandom rand, java.lang.String provider) throws PGPException, java.security.NoSuchProviderException
public PGPSecretKey(int certificationLevel, int algorithm, java.security.PublicKey pubKey, java.security.PrivateKey privKey, java.util.Date time, java.lang.String id, int encAlgorithm, char[] passPhrase, PGPSignatureSubpacketVector hashedPcks, PGPSignatureSubpacketVector unhashedPcks, java.security.SecureRandom rand, java.lang.String provider) throws PGPException, java.security.NoSuchProviderException
public PGPSecretKey(int certificationLevel, int algorithm, java.security.PublicKey pubKey, java.security.PrivateKey privKey, java.util.Date time, java.lang.String id, int encAlgorithm, char[] passPhrase, boolean useSHA1, PGPSignatureSubpacketVector hashedPcks, PGPSignatureSubpacketVector unhashedPcks, java.security.SecureRandom rand, java.lang.String provider) throws PGPException, java.security.NoSuchProviderException
Method Detail |
public boolean isSigningKey()
public boolean isMasterKey()
public int getKeyEncryptionAlgorithm()
public long getKeyID()
public PGPPublicKey getPublicKey()
public java.util.Iterator getUserIDs()
public java.util.Iterator getUserAttributes()
public PGPPrivateKey extractPrivateKey(char[] passPhrase, java.lang.String provider) throws PGPException, java.security.NoSuchProviderException
passPhrase
- provider
-
PGPException
java.security.NoSuchProviderException
public byte[] getEncoded() throws java.io.IOException
java.io.IOException
public void encode(java.io.OutputStream outStream) throws java.io.IOException
java.io.IOException
public static PGPSecretKey copyWithNewPassword(PGPSecretKey key, char[] oldPassPhrase, char[] newPassPhrase, int newEncAlgorithm, java.security.SecureRandom rand, java.lang.String provider) throws PGPException, java.security.NoSuchProviderException
key
- the PGPSecretKey to be copied.oldPassPhrase
- the current password for key.newPassPhrase
- the new password for the key.newEncAlgorithm
- the algorithm to be used for the encryption.rand
- source of randomness.provider
- the provider to use
PGPException
java.security.NoSuchProviderException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |