com.ibm.security12.sun.security.x509
Class X500Signer
java.lang.Object
|
+--com.ibm.security12.java.security.Identity
|
+--com.ibm.security12.java.security.Signer
|
+--com.ibm.security12.sun.security.x509.X500Signer
- public final class X500Signer
- extends Signer
This class provides a binding between a Signature object and an
authenticated X.500 name (from an X.509 certificate chain), which
is needed in many public key signing applications.
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.
- Version:
- 1.19
- Author:
- David Brownell, Amit Kapoor, Hemma Prafullchandra
- See Also:
- Serialized Form
Method Summary |
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. |
Methods inherited from class com.ibm.security12.java.security.Identity |
addCertificate,
certificates,
equals,
getInfo,
getName,
getPublicKey,
getScope,
hashCode,
identityEquals,
removeCertificate,
setInfo,
setPublicKey,
toString |
X500Signer
public X500Signer(Signature sig,
X500Name agent)
update
public void update(byte[] buf,
int offset,
int len)
throws SignatureException
- Called for each chunk of the data being signed. That
is, you can present the data in many chunks, so that
it doesn't need to be in a single sequential buffer.
- Parameters:
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 signed- Throws:
- SignatureException - on errors.
sign
public byte[] sign()
throws SignatureException
- Produces the signature for the data processed by update().
- Throws:
- SignatureException - on errors.
getAlgorithmId
public AlgorithmId getAlgorithmId()
- Returns the algorithm used to sign.
getSigner
public X500Name getSigner()
- Returns the name of the signing agent.