org.bouncycastle.bcpg
Class SignaturePacket
- PacketTags, PublicKeyAlgorithmTags
public class SignaturePacket
generic signature packet
COMPRESSED_DATA , EXPERIMENTAL_1 , EXPERIMENTAL_2 , EXPERIMENTAL_3 , EXPERIMENTAL_4 , LITERAL_DATA , MARKER , MOD_DETECTION_CODE , ONE_PASS_SIGNATURE , PUBLIC_KEY , PUBLIC_KEY_ENC_SESSION , PUBLIC_SUBKEY , RESERVED , SECRET_KEY , SECRET_SUBKEY , SIGNATURE , SYMMETRIC_KEY_ENC , SYMMETRIC_KEY_ENC_SESSION , SYM_ENC_INTEGRITY_PRO , TRUST , USER_ATTRIBUTE , USER_ID |
SignaturePacket(int version, int signatureType, long keyID, int keyAlgorithm, int hashAlgorithm, long creationTime, byte[] fingerPrint, MPInteger[] signature) - Generate a version 2/3 signature packet.
|
SignaturePacket(int version, int signatureType, long keyID, int keyAlgorithm, int hashAlgorithm, SignatureSubpacket[] hashedData, SignatureSubpacket[] unhashedData, byte[] fingerPrint, MPInteger[] signature)
|
SignaturePacket(int signatureType, long keyID, int keyAlgorithm, int hashAlgorithm, SignatureSubpacket[] hashedData, SignatureSubpacket[] unhashedData, byte[] fingerPrint, MPInteger[] signature) - Generate a version 4 signature packet.
|
SignaturePacket
public SignaturePacket(int version,
int signatureType,
long keyID,
int keyAlgorithm,
int hashAlgorithm,
long creationTime,
byte[] fingerPrint,
MPInteger[] signature)
Generate a version 2/3 signature packet.
signatureType
- keyAlgorithm
- hashAlgorithm
- fingerPrint
- signature
-
SignaturePacket
public SignaturePacket(int version,
int signatureType,
long keyID,
int keyAlgorithm,
int hashAlgorithm,
SignatureSubpacket[] hashedData,
SignatureSubpacket[] unhashedData,
byte[] fingerPrint,
MPInteger[] signature)
SignaturePacket
public SignaturePacket(int signatureType,
long keyID,
int keyAlgorithm,
int hashAlgorithm,
SignatureSubpacket[] hashedData,
SignatureSubpacket[] unhashedData,
byte[] fingerPrint,
MPInteger[] signature)
Generate a version 4 signature packet.
signatureType
- keyAlgorithm
- hashAlgorithm
- hashedData
- unhashedData
- fingerPrint
- signature
-
getCreationTime
public long getCreationTime()
Return the creation time of the signature in milli-seconds.
- the creation time in millis
getHashAlgorithm
public int getHashAlgorithm()
return the hashAlgorithm tag
getKeyAlgorithm
public int getKeyAlgorithm()
return the encryption algorithm tag
getKeyID
public long getKeyID()
return the keyID
- the keyID that created the signature.
getSignature
public MPInteger[] getSignature()
return the signature bytes - note this is normalised to be the
ASN.1 encoding of what appears in the signature packet.
getSignatureTrailer
public byte[] getSignatureTrailer()
return the signature trailer that must be included with the data
to reconstruct the signature
getSignatureType
public int getSignatureType()
return the signature type.
getVersion
public int getVersion()
get the version number