public interface Signer
| Modifier and Type | Method and Description |
|---|---|
byte[] |
doAttachedSign(byte[] content)
Generates a digital signature from a content and attaches this content on result file
|
byte[] |
doDetachedSign(byte[] content)
Generates a digital signature from a content,
the result does not contains the content that was signed
|
byte[] |
doHashSign(byte[] hash)
Generates a digital signature from a previous calculated hash for a content,
the result file does not contains the original content that was signed
|
byte[] |
envelopAttachedSign(org.bouncycastle.cms.CMSSignedData signedData)
Generates a digital signature from a content and attaches this content on result
On this step only signed attributes are generates
|
byte[] |
envelopDetachedSign(org.bouncycastle.cms.CMSSignedData signedData)
Generates a digital signature from a content,
the result does not contains the content that was signed
On this step only signed attributes are generates
|
byte[] |
envelopHashSign(org.bouncycastle.cms.CMSSignedData signedData)
Generates a digital signature from a previous calculated hash for a content,
the result does not contains the original content that was signed
On this step only signed attributes are generates
|
String |
getAlgorithm()
Returns the algorithm to be used in the signature
|
Date |
getNotAfterSignerCertificate()
Data of end of Certificate use.
|
PrivateKey |
getPrivateKey()
Returns the private key.
|
PrivateKey |
getPrivateKeyForTimeStamp() |
Provider |
getProvider()
Returns the provider.
|
PublicKey |
getPublicKey()
Returns the public key.
|
String |
getSignatory() |
org.bouncycastle.cms.CMSSignedData |
prepareAttachedSign(byte[] content)
Prepare to Generates a digital signature from a content and attaches this content on result
On this step only signed attributes are generates
|
org.bouncycastle.cms.CMSSignedData |
prepareDetachedSign(byte[] content)
Prepare to Generates a digital signature from a content,
the result does not contains the content that was signed
On this step only signed attributes are generates
|
org.bouncycastle.cms.CMSSignedData |
prepareHashSign(byte[] hash)
Prepare to Generates a digital signature from a previous calculated hash for a content,
the result does not contains the original content that was signed
On this step only signed attributes are generates
|
void |
setAlgorithm(SignerAlgorithmEnum algorithm)
Set an algorithm pre-defined in enumeration.
|
void |
setAlgorithm(String algorithm)
Set a Signature Algorithm.
|
void |
setPrivateKey(PrivateKey privateKey)
Private key required for asymmetric cryptography
|
void |
setPrivateKeyForTimeStamp(PrivateKey privateKey)
Private key required for sign timestamp request
|
void |
setProvider(Provider provider)
Indicates which Provider will be used.
|
void |
setPublicKey(PublicKey publicKey)
Public key needed for asymmetric cryptography
|
void setProvider(Provider provider)
provider - provider to be usedvoid setPrivateKey(PrivateKey privateKey)
privateKey - private key to be usedvoid setPublicKey(PublicKey publicKey)
publicKey - public key to be usedvoid setAlgorithm(String algorithm)
algorithm - algorithm to be usedvoid setAlgorithm(SignerAlgorithmEnum algorithm)
algorithm - algorithm representation to be usedbyte[] doAttachedSign(byte[] content)
content - content to be signedbyte[] doDetachedSign(byte[] content)
content - content to be signedProvider getProvider()
PrivateKey getPrivateKey()
String getAlgorithm()
PublicKey getPublicKey()
byte[] doHashSign(byte[] hash)
hash - hash to be signedvoid setPrivateKeyForTimeStamp(PrivateKey privateKey)
privateKey - to be used for request timestampPrivateKey getPrivateKeyForTimeStamp()
Date getNotAfterSignerCertificate()
String getSignatory()
org.bouncycastle.cms.CMSSignedData prepareDetachedSign(byte[] content)
content - full content to signorg.bouncycastle.cms.CMSSignedData prepareAttachedSign(byte[] content)
content - content to be signedorg.bouncycastle.cms.CMSSignedData prepareHashSign(byte[] hash)
hash - hash to be signedbyte[] envelopDetachedSign(org.bouncycastle.cms.CMSSignedData signedData)
signedData - signed attributesbyte[] envelopAttachedSign(org.bouncycastle.cms.CMSSignedData signedData)
signedData - signed attributesbyte[] envelopHashSign(org.bouncycastle.cms.CMSSignedData signedData)
signedData - signed attributesCopyright © 2025 SERPRO - Serviço Federal de Processamento de Dados. All rights reserved.