PR - type of PrivateKey.PU - type of PublicKey.public class SignatureProcessorFactoryImplCryptorWithHash<PR extends PrivateKey,PU extends PublicKey> extends Object implements SignatureProcessorFactory<SignatureBinary,PR,PU>
| Modifier and Type | Field and Description |
|---|---|
private AsymmetricCryptorFactory<PR,PU> |
cryptorFactory |
private HashFactory |
hashFactory |
| Constructor and Description |
|---|
SignatureProcessorFactoryImplCryptorWithHash(AsymmetricCryptorFactory<PR,PU> cryptorFactory,
HashFactory hashFactory)
The constructor.
|
| Modifier and Type | Method and Description |
|---|---|
SignatureBinary |
createSignature(byte[] data) |
SignatureProcessorFactory<SignatureBinary,PR,PU> |
getSignatureFactoryWithoutHash() |
SignatureSigner<SignatureBinary> |
newSigner(PR privateKey) |
SignatureVerifier<SignatureBinary> |
newVerifier(PU publicKey) |
String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitnewSignerUnsafe, newVerifierUnsafeprivate final HashFactory hashFactory
private final AsymmetricCryptorFactory<PR extends PrivateKey,PU extends PublicKey> cryptorFactory
public SignatureProcessorFactoryImplCryptorWithHash(AsymmetricCryptorFactory<PR,PU> cryptorFactory, HashFactory hashFactory)
cryptorFactory - the AsymmetricCryptorFactory to delegate to.hashFactory - the HashFactory to apply as extension.public SignatureSigner<SignatureBinary> newSigner(PR privateKey)
newSigner in interface SignatureProcessorFactory<SignatureBinary,PR extends PrivateKey,PU extends PublicKey>privateKey - the PrivateKey to use for signing.SignatureSigner for signing.public SignatureVerifier<SignatureBinary> newVerifier(PU publicKey)
newVerifier in interface SignatureProcessorFactory<SignatureBinary,PR extends PrivateKey,PU extends PublicKey>publicKey - the PublicKey to use for verifying.SignatureVerifier for verifying.public SignatureBinary createSignature(byte[] data)
createSignature in interface SignatureFactory<SignatureBinary>data - the binary signature data.SignatureBinary.public SignatureProcessorFactory<SignatureBinary,PR,PU> getSignatureFactoryWithoutHash()
getSignatureFactoryWithoutHash in interface SignatureProcessorFactory<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.