S - type of SignatureBinary.PR - type of PrivateKey.PU - type of PublicKey.public class SignatureProcessorFactoryImpl<S extends SignatureBinary,PR extends PrivateKey,PU extends PublicKey> extends AbstractCryptoAlgorithmWithRandom implements SignatureProcessorFactory<S,PR,PU>
SignatureProcessorFactory based on Signature.| Modifier and Type | Field and Description |
|---|---|
private SignatureConfig<S> |
config |
provider| Constructor and Description |
|---|
SignatureProcessorFactoryImpl(SignatureConfig<S> config,
RandomFactory randomFactory)
The constructor.
|
| Modifier and Type | Method and Description |
|---|---|
S |
createSignature(byte[] data) |
String |
getAlgorithm() |
SignatureProcessorFactory<S,PR,PU> |
getSignatureFactoryWithoutHash() |
private HashCreator |
newHashCreator() |
SignatureSigner<S> |
newSigner(PR privateKey) |
SignatureVerifier<S> |
newVerifier(PU publicKey) |
createSecureRandom, getRandomFactorygetProvidercreationFailedException, creationFailedException, creationFailedException, creationFailedException, getAlgorithm, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitnewSignerUnsafe, newVerifierUnsafeprivate final SignatureConfig<S extends SignatureBinary> config
public SignatureProcessorFactoryImpl(SignatureConfig<S> config, RandomFactory randomFactory)
config - the SignatureConfig.randomFactory - the RandomFactory.public String getAlgorithm()
getAlgorithm in interface CryptoAlgorithmKey.getAlgorithm(),
Signature.getAlgorithm(),
MessageDigest.getAlgorithm(),
SecureRandom.getAlgorithm(),
Cipher.getAlgorithm()private HashCreator newHashCreator()
public SignatureSigner<S> newSigner(PR privateKey)
newSigner in interface SignatureProcessorFactory<S extends SignatureBinary,PR extends PrivateKey,PU extends PublicKey>privateKey - the PrivateKey to use for signing.SignatureSigner for signing.public SignatureVerifier<S> newVerifier(PU publicKey)
newVerifier in interface SignatureProcessorFactory<S extends SignatureBinary,PR extends PrivateKey,PU extends PublicKey>publicKey - the PublicKey to use for verifying.SignatureVerifier for verifying.public S createSignature(byte[] data)
createSignature in interface SignatureFactory<S extends SignatureBinary>data - the binary signature data.SignatureBinary.public SignatureProcessorFactory<S,PR,PU> getSignatureFactoryWithoutHash()
getSignatureFactoryWithoutHash in interface SignatureProcessorFactory<S extends SignatureBinary,PR extends PrivateKey,PU extends PublicKey>SignatureFactory that does not hash before signing so you can control
the hashing manually and only sign the resulting hash (e.g. to reuse the hash value for further
calculations).Copyright © 2001–2019 mmm-Team. All rights reserved.