Module io.github.mmm.crypto
Interface SignatureProcessorFactory<S extends SignatureBinary,PR extends PrivateKey,PU extends PublicKey>
-
- Type Parameters:
S- type ofSignatureBinary.PR- type ofPrivateKey.PU- type ofPublicKey.
- All Superinterfaces:
SignatureFactory<S>
- All Known Implementing Classes:
AsymmetricAccess,AsymmetricAccessEcBc,Curve25519,Rsa,Secp256k1,SignatureProcessorFactoryImpl,SignatureProcessorFactoryImplCryptorWithHash,SignatureProcessorFactoryImplEcBc,SignatureProcessorFactoryImplWithHash
public interface SignatureProcessorFactory<S extends SignatureBinary,PR extends PrivateKey,PU extends PublicKey> extends SignatureFactory<S>
Interface for afactoryto create instances ofSignatureProcessorforasymmetric cryptography.Signaturesonly work with asymmetric security. For a givenprivate keyaSignatureSignercan becreatedthat allows tosignany message. With the correspondingpublic keyanyone cancreateaSignatureVerifiertoverifytheSignatureBinary.
An instance ofSignatureProcessorFactorytypically combines asymmetriccryptographywithhashing.- Since:
- 1.0.0
- Author:
- Joerg Hohwiller (hohwille at users.sourceforge.net)
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description SignatureProcessorFactory<S,PR,PU>getSignatureFactoryWithoutHash()SignatureSigner<S>newSigner(PR privateKey)default SignatureSigner<S>newSignerUnsafe(PrivateKey privateKey)SignatureVerifier<S>newVerifier(PU publicKey)default SignatureVerifier<S>newVerifierUnsafe(PublicKey publicKey)-
Methods inherited from interface io.github.mmm.crypto.asymmetric.sign.SignatureFactory
createSignature
-
-
-
-
Method Detail
-
newSignerUnsafe
default SignatureSigner<S> newSignerUnsafe(PrivateKey privateKey)
- Parameters:
privateKey- thePrivateKeyto use for signing.- Returns:
- the
SignatureSignerfor signing.
-
newSigner
SignatureSigner<S> newSigner(PR privateKey)
- Parameters:
privateKey- thePrivateKeyto use for signing.- Returns:
- the
SignatureSignerfor signing.
-
newVerifierUnsafe
default SignatureVerifier<S> newVerifierUnsafe(PublicKey publicKey)
- Parameters:
publicKey- thePublicKeyto use for verifying.- Returns:
- the
SignatureVerifierfor verifying.
-
newVerifier
SignatureVerifier<S> newVerifier(PU publicKey)
- Parameters:
publicKey- thePublicKeyto use for verifying.- Returns:
- the
SignatureVerifierfor verifying.
-
getSignatureFactoryWithoutHash
SignatureProcessorFactory<S,PR,PU> getSignatureFactoryWithoutHash()
- Returns:
- an instance of this
SignatureFactorythat 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).
-
-