A PGP signature object.
BINARY_DOCUMENT
public static final int BINARY_DOCUMENT
- 0
CANONICAL_TEXT_DOCUMENT
public static final int CANONICAL_TEXT_DOCUMENT
- 1
CASUAL_CERTIFICATION
public static final int CASUAL_CERTIFICATION
- 18
CERTIFICATION_REVOCATION
public static final int CERTIFICATION_REVOCATION
- 48
DEFAULT_CERTIFICATION
public static final int DEFAULT_CERTIFICATION
- 16
DIRECT_KEY
public static final int DIRECT_KEY
- 31
KEY_REVOCATION
public static final int KEY_REVOCATION
- 32
NO_CERTIFICATION
public static final int NO_CERTIFICATION
- 17
POSITIVE_CERTIFICATION
public static final int POSITIVE_CERTIFICATION
- 19
STAND_ALONE
public static final int STAND_ALONE
- 2
SUBKEY_BINDING
public static final int SUBKEY_BINDING
- 24
SUBKEY_REVOCATION
public static final int SUBKEY_REVOCATION
- 40
TIMESTAMP
public static final int TIMESTAMP
- 64
encode
public void encode(OutputStream outStream)
throws IOException
getCreationTime
public Date getCreationTime()
Return the creation time of the signature.
- the signature creation time.
getEncoded
public byte[] getEncoded()
throws IOException
getKeyID
public long getKeyID()
Return the id of the key that created the signature.
- keyID of the signatures corresponding key.
getSignature
public byte[] getSignature()
throws PGPException
getSignatureTrailer
public byte[] getSignatureTrailer()
getSignatureType
public int getSignatureType()
update
public void update(byte b)
throws SignatureException
update
public void update(byte[] bytes)
throws SignatureException
update
public void update(byte[] bytes,
int off,
int length)
throws SignatureException
verify
public boolean verify()
throws PGPException,
SignatureException
verifyCertification
public boolean verifyCertification(String id,
PGPPublicKey key)
throws PGPException,
SignatureException
Verify the signature as certifying the passed in public key as associated
with the passed in id.
id
- id the key was stored underkey
- the key to be verified.
- true if the signature matches, false otherwise.
PGPException
-
verifyCertification
public boolean verifyCertification(PGPPublicKey pubKey)
throws SignatureException,
PGPException
Verify a key certification, such as a revocation, for the passed in key.
pubKey
- the key we are checking.
- true if the certification is valid, false otherwise.
PGPException
-
verifyCertification
public boolean verifyCertification(PGPPublicKey masterKey,
PGPPublicKey pubKey)
throws SignatureException,
PGPException
Verify a certification for the passed in key against the passed in
master key.
masterKey
- the key we are verifying against.pubKey
- the key we are verifying.
- true if the certification is valid, false otherwise.
PGPException
-