public final class X500Signer
extends java.lang.Object
The name of the signer is important, both because knowing it is the whole point of the signature, and because the associated X.509 certificate is always used to verify the signature.
The X.509 certificate chain is temporarily not associated with the signer, but this omission will be resolved.
Constructor and Description |
---|
X500Signer(java.security.Signature sig,
X500Name agent) |
Modifier and Type | Method and Description |
---|---|
AlgorithmId |
getAlgorithmId()
Returns the algorithm used to sign.
|
X500Name |
getSigner()
Returns the name of the signing agent.
|
byte[] |
sign()
Produces the signature for the data processed by update().
|
void |
update(byte[] buf,
int offset,
int len)
Called for each chunk of the data being signed.
|
public X500Signer(java.security.Signature sig, X500Name agent)
public void update(byte[] buf, int offset, int len) throws java.security.SignatureException
buf
- buffer holding the next chunk of the data to be signedoffset
- starting point of to-be-signed datalen
- how many bytes of data are to be signedjava.security.SignatureException
- on errors.public byte[] sign() throws java.security.SignatureException
java.security.SignatureException
- on errors.public AlgorithmId getAlgorithmId()
public X500Name getSigner()