Rename methods related only to security tokens
This commit is contained in:
@@ -203,7 +203,7 @@ public class CanonicalizedPublicKey extends UncachedPublicKey {
|
||||
}
|
||||
|
||||
// For use only in card export; returns the public key.
|
||||
public ECPublicKey getECPublicKey()
|
||||
public ECPublicKey getSecurityTokenECPublicKey()
|
||||
throws PgpGeneralException {
|
||||
JcaPGPKeyConverter keyConverter = new JcaPGPKeyConverter();
|
||||
PublicKey retVal;
|
||||
@@ -216,7 +216,7 @@ public class CanonicalizedPublicKey extends UncachedPublicKey {
|
||||
return (ECPublicKey) retVal;
|
||||
}
|
||||
|
||||
public ASN1ObjectIdentifier getHashAlgorithm()
|
||||
public ASN1ObjectIdentifier getSecurityTokenHashAlgorithm()
|
||||
throws PGPException {
|
||||
if (!isEC()) {
|
||||
throw new PGPException("Key encryption OID is valid only for EC key!");
|
||||
@@ -236,7 +236,7 @@ public class CanonicalizedPublicKey extends UncachedPublicKey {
|
||||
}
|
||||
}
|
||||
|
||||
public int getSymmetricKeySize()
|
||||
public int getSecurityTokenSymmetricKeySize()
|
||||
throws PGPException {
|
||||
if (!isEC()) {
|
||||
throw new PGPException("Key encryption OID is valid only for EC key!");
|
||||
|
||||
@@ -300,7 +300,7 @@ public class CanonicalizedSecretKey extends CanonicalizedPublicKey {
|
||||
}
|
||||
|
||||
// For use only in card export; returns the secret key in Chinese Remainder Theorem format.
|
||||
public RSAPrivateCrtKey getCrtSecretKey() throws PgpGeneralException {
|
||||
public RSAPrivateCrtKey getSecurityTokenRSASecretKey() throws PgpGeneralException {
|
||||
if (mPrivateKeyState == PRIVATE_KEY_STATE_LOCKED) {
|
||||
throw new PgpGeneralException("Cannot get secret key attributes while key is locked.");
|
||||
}
|
||||
@@ -321,7 +321,7 @@ public class CanonicalizedSecretKey extends CanonicalizedPublicKey {
|
||||
}
|
||||
|
||||
// For use only in card export; returns the secret key.
|
||||
public ECPrivateKey getECSecretKey()
|
||||
public ECPrivateKey getSecurityTokenECSecretKey()
|
||||
throws PgpGeneralException {
|
||||
if (mPrivateKeyState == PRIVATE_KEY_STATE_LOCKED) {
|
||||
throw new PgpGeneralException("Cannot get secret key attributes while key is locked.");
|
||||
|
||||
Reference in New Issue
Block a user