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
IOExceptionpublic boolean verifySignature(byte[] message,
byte[] ds,
U dpk)
throws IOException
IOExceptionpublic String getKeyFormat()
public abstract byte[] encodeSignature(byte[] signature)
throws IOException
IOExceptionpublic abstract byte[] decodeSignature(byte[] encodedSignature)
throws IOException
IOExceptionpublic abstract byte[] encodePublicKey(U publicKey) throws IOException
IOExceptionpublic abstract U decodePublicKey(byte[] encodedPublicKey) throws IOException
IOExceptionpublic abstract List<CertificateDecoder> getCertificateDecoders()
public boolean supportsKey(PrivateKey key)
Copyright © 2018. All rights reserved.