|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
org.mozilla.jss.crypto
Class Signature
java.lang.Object org.mozilla.jss.crypto.Signature
Deprecated. Use the JCA interface instead (
Signature
)
public class Signature
- extends java.lang.Object
A class for producing and verifying digital signatures.
Instances of this class can be obtain from CryptoToken
s.
Field Summary | |
---|---|
protected SignatureAlgorithm |
algorithm
Deprecated. |
protected SignatureSpi |
engine
Deprecated. |
Constructor Summary | |
---|---|
protected |
Signature()
Deprecated. |
Method Summary | |
---|---|
protected java.lang.Object |
clone()
Deprecated. Cloning is not supported yet |
java.lang.String |
getAlgorithm()
Deprecated. Returns the name of the algorithm to be used for signing. |
SignatureAlgorithm |
getAlgorithmID()
Deprecated. Returns the algorithm to be used for signing. |
java.security.Provider |
getProvider()
Deprecated. This is not supported yet. |
void |
initSign(PrivateKey privateKey)
Deprecated. Initialize the signature context for signing. |
void |
initVerify(java.security.PublicKey publicKey)
Deprecated. Initialize the signature context for verifying. |
void |
setParameter(java.security.spec.AlgorithmParameterSpec params)
Deprecated. Set parameters for the signing algorithm. |
byte[] |
sign()
Deprecated. Finish a signing operation and return the signature. |
int |
sign(byte[] outbuf,
int offset,
int len)
Deprecated. Finish a signing operation and store the signature in the provided buffer. |
void |
update(byte b)
Deprecated. Provide more data for a signature or verification operation. |
void |
update(byte[] data)
Deprecated. Provide more data for a signature or verification operation. |
void |
update(byte[] data,
int off,
int len)
Deprecated. Provide more data for a signature or verification operation. |
boolean |
verify(byte[] signature)
Deprecated. Finish a verification operation. |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
algorithm
protected SignatureAlgorithm algorithm
- Deprecated.
engine
protected SignatureSpi engine
- Deprecated.
Constructor Detail |
---|
Signature
protected Signature()
- Deprecated.
Method Detail |
---|
getProvider
public java.security.Provider getProvider()
- Deprecated.
- This is not supported yet.
- This is not supported yet.
initSign
public void initSign(PrivateKey privateKey) throws java.security.InvalidKeyException, TokenException
- Deprecated.
- Initialize the signature context for signing.
- Parameters:
privateKey
- The private key with which to sign.- Throws:
java.security.InvalidKeyException
- If the key is the wrong type for the algorithm or does not exist on the token of this signature context.TokenException
- If an error occurred on the token.
- Initialize the signature context for signing.
initVerify
public void initVerify(java.security.PublicKey publicKey) throws java.security.InvalidKeyException, TokenException
- Deprecated.
- Initialize the signature context for verifying.
- Parameters:
publicKey
- The public key with which to verify the signature.- Throws:
java.security.InvalidKeyException
- If the key is the wrong type for the algorithm.TokenException
- If an error occurs on the token.
- Initialize the signature context for verifying.
setParameter
public void setParameter(java.security.spec.AlgorithmParameterSpec params) throws java.security.InvalidAlgorithmParameterException, TokenException
- Deprecated.
- Set parameters for the signing algorithm. This is currently not supported or needed.
- Parameters:
params
- Parameters for the signing algorithm.- Throws:
java.security.InvalidAlgorithmParameterException
- If there is something wrong with the parameters.TokenException
- If an error occurs on the token.
- Set parameters for the signing algorithm. This is currently not supported or needed.
sign
public byte[] sign() throws java.security.SignatureException, TokenException
- Deprecated.
- Finish a signing operation and return the signature.
- Returns:
- The signature.
- Throws:
java.security.SignatureException
- If an error occurs with the signing operation.TokenException
- If an error occurs on the token.
- Finish a signing operation and return the signature.
sign
public int sign(byte[] outbuf, int offset, int len) throws java.security.SignatureException, TokenException
- Deprecated.
- Finish a signing operation and store the signature in the provided buffer.
- Parameters:
outbuf
- Buffer to hold the signatureoffset
- Offset in buffer at which to store signature.len
- Number of bytes of buffer available for signature.- Returns:
- int The number of bytes placed into outbuf.
- Throws:
java.security.SignatureException
- If an error occurred while signing, or len was insufficient to contain the signature.TokenException
- If an error occurred on the token.
- Finish a signing operation and store the signature in the provided buffer.
verify
public boolean verify(byte[] signature) throws java.security.SignatureException, TokenException
- Deprecated.
- Finish a verification operation.
- Parameters:
signature
- The signature to be verified.- Returns:
- true if the signature is valid, false if it is invalid.
- Throws:
java.security.SignatureException
- If an error occurred with the verification operationTokenException
- If an error occurred on the token.
- Finish a verification operation.
update
public void update(byte b) throws java.security.SignatureException, TokenException
- Deprecated.
- Provide more data for a signature or verification operation.
- Parameters:
b
- A byte to be signed or verified.- Throws:
java.security.SignatureException
- If an error occurs in the signature/verifcation.TokenException
- If an error occurs on the token.
- Provide more data for a signature or verification operation.
update
public void update(byte[] data) throws java.security.SignatureException, TokenException
- Deprecated.
- Provide more data for a signature or verification operation.
- Parameters:
data
- An array of bytes to be signed or verified.- Throws:
java.security.SignatureException
- If an error occurs in the signature/verifcation.TokenException
- If an error occurs on the token.
- Provide more data for a signature or verification operation.
update
public void update(byte[] data, int off, int len) throws java.security.SignatureException, TokenException
- Deprecated.
- Provide more data for a signature or verification operation.
- Parameters:
data
- An array of bytes, some of which will be signed or verified.off
- The beginning offset of the bytes to be signed/verified.len
- The number of bytes to be signed/verified.- Throws:
java.security.SignatureException
- If an error occurs in the signature/verifcation.TokenException
- If an error occurs on the token.
- Provide more data for a signature or verification operation.
getAlgorithm
public java.lang.String getAlgorithm()
- Deprecated.
- Returns the name of the algorithm to be used for signing.
- Returns the name of the algorithm to be used for signing.
getAlgorithmID
public SignatureAlgorithm getAlgorithmID()
- Deprecated.
- Returns the algorithm to be used for signing.
- Returns the algorithm to be used for signing.
clone
protected java.lang.Object clone() throws java.lang.CloneNotSupportedException
- Deprecated.
- Cloning is not supported yet
- Overrides:
clone
in classjava.lang.Object
- Throws:
java.lang.CloneNotSupportedException
- Cloning is not supported yet
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |