public static enum SecurityUtils.PublicKeyAlgorithm extends java.lang.Enum<SecurityUtils.PublicKeyAlgorithm>
Modifier and Type | Method and Description |
---|---|
ASN1Object |
createAlgorithmIdentifier(ASN1ObjectIdentifier signature) |
java.security.PublicKey |
generatePublicKey(java.security.spec.KeySpec keySpec) |
abstract ASN1ObjectIdentifier |
getSignatureAlgorithm(int bits) |
static int |
getSignatureSize(java.lang.String oid) |
static java.security.PrivateKey |
loadPrivateKey(java.security.spec.PKCS8EncodedKeySpec pkcs8) |
static java.security.PrivateKey |
loadPrivateKey(java.lang.String pemEncodedPrivateKey,
char[] passphrase) |
static java.security.PublicKey |
loadPublicKey(java.lang.String pemEncodedPublicKey) |
static java.security.PublicKey |
loadPublicKey(java.security.spec.X509EncodedKeySpec x509) |
abstract java.security.KeyPair |
reKey(java.security.PublicKey publicKey) |
abstract byte[] |
sign(java.security.spec.KeySpec keySpec,
ASN1Object hash,
byte[] digest) |
static SecurityUtils.PublicKeyAlgorithm |
valueOf(java.security.PrivateKey privateKey) |
static SecurityUtils.PublicKeyAlgorithm |
valueOf(java.security.PublicKey publicKey) |
static SecurityUtils.PublicKeyAlgorithm |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static SecurityUtils.PublicKeyAlgorithm[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
static boolean |
verify(java.security.cert.Certificate cert,
ASN1Object hash,
byte[] digest,
byte[] signature) |
boolean |
verify(java.security.spec.KeySpec keySpec,
ASN1Object hash,
byte[] digest,
byte[] signature) |
abstract boolean |
verify(java.security.PublicKey publicKey,
ASN1Object hash,
byte[] digest,
byte[] signature) |
public static final SecurityUtils.PublicKeyAlgorithm RSA
public static final SecurityUtils.PublicKeyAlgorithm DSA
public static final SecurityUtils.PublicKeyAlgorithm EC
public static SecurityUtils.PublicKeyAlgorithm[] values()
for (SecurityUtils.PublicKeyAlgorithm c : SecurityUtils.PublicKeyAlgorithm.values()) System.out.println(c);
public static SecurityUtils.PublicKeyAlgorithm valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic abstract ASN1ObjectIdentifier getSignatureAlgorithm(int bits)
public abstract java.security.KeyPair reKey(java.security.PublicKey publicKey) throws java.security.GeneralSecurityException
java.security.GeneralSecurityException
public ASN1Object createAlgorithmIdentifier(ASN1ObjectIdentifier signature)
public static int getSignatureSize(java.lang.String oid) throws java.security.NoSuchAlgorithmException
java.security.NoSuchAlgorithmException
public static java.security.PrivateKey loadPrivateKey(java.security.spec.PKCS8EncodedKeySpec pkcs8) throws java.lang.Exception
java.lang.Exception
public static java.security.PrivateKey loadPrivateKey(java.lang.String pemEncodedPrivateKey, char[] passphrase) throws java.lang.Exception
java.lang.Exception
public static java.security.PublicKey loadPublicKey(java.security.spec.X509EncodedKeySpec x509) throws java.lang.Exception
java.lang.Exception
public static java.security.PublicKey loadPublicKey(java.lang.String pemEncodedPublicKey) throws java.lang.Exception
java.lang.Exception
public static SecurityUtils.PublicKeyAlgorithm valueOf(java.security.PrivateKey privateKey) throws java.security.NoSuchAlgorithmException
java.security.NoSuchAlgorithmException
public static SecurityUtils.PublicKeyAlgorithm valueOf(java.security.PublicKey publicKey) throws java.security.NoSuchAlgorithmException
java.security.NoSuchAlgorithmException
public abstract byte[] sign(java.security.spec.KeySpec keySpec, ASN1Object hash, byte[] digest) throws java.lang.Exception
java.lang.Exception
public abstract boolean verify(java.security.PublicKey publicKey, ASN1Object hash, byte[] digest, byte[] signature) throws java.lang.Exception
java.lang.Exception
public java.security.PublicKey generatePublicKey(java.security.spec.KeySpec keySpec) throws java.lang.Exception
java.lang.Exception
public boolean verify(java.security.spec.KeySpec keySpec, ASN1Object hash, byte[] digest, byte[] signature) throws java.lang.Exception
java.lang.Exception
public static boolean verify(java.security.cert.Certificate cert, ASN1Object hash, byte[] digest, byte[] signature) throws java.lang.Exception
java.lang.Exception