public abstract class KeyAlgorithm<U extends PublicKey,R extends PrivateKey> extends Object
Modifier | Constructor and Description |
---|---|
protected |
KeyAlgorithm(String signatureAlgorithm,
String keyFormat,
Class<R> keyType) |
protected |
KeyAlgorithm(String signatureAlgorithm,
String keyFormat,
Class<R> keyType,
Provider provider) |
Modifier and Type | Method and Description |
---|---|
abstract U |
decodePublicKey(byte[] encodedPublicKey) |
abstract byte[] |
decodeSignature(byte[] encodedSignature) |
abstract byte[] |
encodePublicKey(U publicKey) |
abstract byte[] |
encodeSignature(byte[] signature) |
byte[] |
generateSignature(byte[] message,
R pk,
SecureRandom rnd) |
abstract List<CertificateDecoder> |
getCertificateDecoders() |
String |
getKeyFormat() |
boolean |
supportsKey(PrivateKey key) |
boolean |
verifySignature(byte[] message,
byte[] ds,
U dpk) |
public byte[] generateSignature(byte[] message, R pk, SecureRandom rnd) throws IOException
IOException
public boolean verifySignature(byte[] message, byte[] ds, U dpk) throws IOException
IOException
public String getKeyFormat()
public abstract byte[] encodeSignature(byte[] signature) throws IOException
IOException
public abstract byte[] decodeSignature(byte[] encodedSignature) throws IOException
IOException
public abstract byte[] encodePublicKey(U publicKey) throws IOException
IOException
public abstract U decodePublicKey(byte[] encodedPublicKey) throws IOException
IOException
public abstract List<CertificateDecoder> getCertificateDecoders()
public boolean supportsKey(PrivateKey key)
Copyright © 2020. All rights reserved.