jxta.security.signature
Interface Signature
- public interface Signature
- extends Description
Method Summary |
byte |
getAlgorithm()
return algorithm type value |
java.lang.String |
getAlgorithmName()
return algorithm name as a String |
void |
init(byte theMode)
initialize the Signature object behaviour |
byte[] |
sign(byte[] inbuff,
int offset,
int inLength)
signs the digest after updating the last buffer of data
(may be the only buffer) |
void |
update(byte[] inbuf,
int offset,
int length)
updates data to be signed. |
boolean |
verify(byte[] inBuff,
int inOffset,
int inLength,
byte[] sigBuff,
int sigOffset,
int sigLength)
Verifies a signature after updating last/only inBuff against
the signature in sigBuff. |
name
public static final java.lang.String name
ALG_NULL
public static final byte ALG_NULL
ALG_RSA_SHA_PKCS1
public static final byte ALG_RSA_SHA_PKCS1
ALG_RSA_MD5_PKCS1
public static final byte ALG_RSA_MD5_PKCS1
MODE_SIGN
public static final byte MODE_SIGN
MODE_VERIFY
public static final byte MODE_VERIFY
getAlgorithmName
public java.lang.String getAlgorithmName()
- return algorithm name as a String
- Specified by:
- getAlgorithmName in interface Description
getAlgorithm
public byte getAlgorithm()
- return algorithm type value
init
public void init(byte theMode)
throws CryptoException
- initialize the Signature object behaviour
update
public void update(byte[] inbuf,
int offset,
int length)
throws CryptoException
- updates data to be signed.
sign
public byte[] sign(byte[] inbuff,
int offset,
int inLength)
throws CryptoException
- signs the digest after updating the last buffer of data
(may be the only buffer)
verify
public boolean verify(byte[] inBuff,
int inOffset,
int inLength,
byte[] sigBuff,
int sigOffset,
int sigLength)
throws CryptoException
- Verifies a signature after updating last/only inBuff against
the signature in sigBuff. One can use update as with
sign().