Package org.bouncycastle.bcpg
Class PublicKeyUtils
java.lang.Object
org.bouncycastle.bcpg.PublicKeyUtils
Utility methods related to OpenPGP public key algorithms.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanisEncryptionAlgorithm(int publicKeyAlgorithm) Return true, if the public key algorithm that corresponds to the given ID is capable of encryption.static booleanisSigningAlgorithm(int publicKeyAlgorithm) Return true, if the public key algorithm that corresponds to the given ID is capable of signing.
-
Constructor Details
-
PublicKeyUtils
public PublicKeyUtils()
-
-
Method Details
-
isSigningAlgorithm
public static boolean isSigningAlgorithm(int publicKeyAlgorithm) Return true, if the public key algorithm that corresponds to the given ID is capable of signing.- Parameters:
publicKeyAlgorithm- public key algorithm id- Returns:
- true if algorithm can sign
-
isEncryptionAlgorithm
public static boolean isEncryptionAlgorithm(int publicKeyAlgorithm) Return true, if the public key algorithm that corresponds to the given ID is capable of encryption.- Parameters:
publicKeyAlgorithm- public key algorithm id- Returns:
- true if algorithm can encrypt
-