org.bouncycastle.openpgp
public class PGPSignature extends Object
Field Summary | |
---|---|
static int | BINARY_DOCUMENT |
static int | CANONICAL_TEXT_DOCUMENT |
static int | CASUAL_CERTIFICATION |
static int | CERTIFICATION_REVOCATION |
static int | DEFAULT_CERTIFICATION |
static int | DIRECT_KEY |
static int | KEY_REVOCATION |
static int | NO_CERTIFICATION |
static int | POSITIVE_CERTIFICATION |
static int | STAND_ALONE |
static int | SUBKEY_BINDING |
static int | SUBKEY_REVOCATION |
static int | TIMESTAMP |
Method Summary | |
---|---|
void | encode(OutputStream outStream) |
Date | getCreationTime()
Return the creation time of the signature.
|
byte[] | getEncoded() |
int | getHashAlgorithm()
Return the hash algorithm associated with this signature. |
PGPSignatureSubpacketVector | getHashedSubPackets() |
int | getKeyAlgorithm()
Return the key algorithm associated with this signature. |
long | getKeyID()
Return the id of the key that created the signature. |
byte[] | getSignature() |
byte[] | getSignatureTrailer() |
int | getSignatureType() |
PGPSignatureSubpacketVector | getUnhashedSubPackets() |
int | getVersion()
Return the OpenPGP version number for this signature.
|
void | initVerify(PGPPublicKey pubKey, String provider) |
void | update(byte b) |
void | update(byte[] bytes) |
void | update(byte[] bytes, int off, int length) |
boolean | verify() |
boolean | verifyCertification(String id, PGPPublicKey key)
Verify the signature as certifying the passed in public key as associated
with the passed in id.
|
boolean | verifyCertification(PGPPublicKey masterKey, PGPPublicKey pubKey)
Verify a certification for the passed in key against the passed in
master key.
|
boolean | verifyCertification(PGPPublicKey pubKey)
Verify a key certification, such as a revocation, for the passed in key.
|
Returns: the signature creation time.
Returns: signature hash algorithm.
Returns: signature key algorithm.
Returns: keyID of the signatures corresponding key.
Returns: signature version number.
Parameters: id id the key was stored under key the key to be verified.
Returns: true if the signature matches, false otherwise.
Throws: PGPException SignatureException
Parameters: masterKey the key we are verifying against. pubKey the key we are verifying.
Returns: true if the certification is valid, false otherwise.
Throws: SignatureException PGPException
Parameters: pubKey the key we are checking.
Returns: true if the certification is valid, false otherwise.
Throws: SignatureException PGPException