@Immutable public class DigitalSignatureSigner extends java.lang.Object implements SignatureSigner
Constructor and Description |
---|
DigitalSignatureSigner(java.nio.file.Path privateKeyPath) |
DigitalSignatureSigner(java.nio.file.Path privateKeyPath,
java.lang.String algorithm) |
DigitalSignatureSigner(java.lang.String privateKeyInPem) |
DigitalSignatureSigner(java.lang.String privateKeyInPem,
java.lang.String algorithm) |
Modifier and Type | Method and Description |
---|---|
protected void |
finalize()
SpotBugs detects Bug Type "CT_CONSTRUCTOR_THROW" saying that "The object under construction
remains partially initialized and may be vulnerable to Finalizer attacks."
|
byte[] |
sign(byte[] bytes)
Signs the given byte array with a
Signature . |
public DigitalSignatureSigner(java.nio.file.Path privateKeyPath)
public DigitalSignatureSigner(java.nio.file.Path privateKeyPath, java.lang.String algorithm)
public DigitalSignatureSigner(java.lang.String privateKeyInPem)
public DigitalSignatureSigner(java.lang.String privateKeyInPem, java.lang.String algorithm)
protected final void finalize()
finalize
in class java.lang.Object
public byte[] sign(byte[] bytes)
Signature
.sign
in interface SignatureSigner
bytes
- the byte array to signSignatureException
- if it fails to sign