| Modifier and Type | Field and Description |
|---|---|
| private long | |
| private byte[] | |
| private int | |
| private SignatureSubpacket[] | |
| private int | |
| private long | |
| private byte[] | |
| private MPInteger[] | |
| private byte[] | |
| private int | |
| private SignatureSubpacket[] | |
| private int | |
| public static final int | |
| public static final int | |
| public static final int | |
| public static final int | |
| public static final int |
| Access | Constructor and Description |
|---|---|
| pack-priv | |
| pack-priv | |
| public | SignaturePacket(int signatureType, long keyID, int keyAlgorithm, int hashAlgorithm, SignatureSubpacket[] hashedData, SignatureSubpacket[] unhashedData, byte[] fingerPrint, MPInteger[] signature)
Generate a version 4 signature packet. |
| 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. |
| public | SignaturePacket(int version, int signatureType, long keyID, int keyAlgorithm, int hashAlgorithm, SignatureSubpacket[] hashedData, SignatureSubpacket[] unhashedData, byte[] fingerPrint, MPInteger[] signature)
|
| public | SignaturePacket(int version, int signatureType, long keyID, int keyAlgorithm, int hashAlgorithm, SignatureSubpacket[] hashedData, SignatureSubpacket[] unhashedData, byte[] fingerPrint, byte[] signatureEncoding, byte[] salt)
|
| public | SignaturePacket(int version, int signatureType, long keyID, int keyAlgorithm, int hashAlgorithm, SignatureSubpacket[] hashedData, SignatureSubpacket[] unhashedData, byte[] fingerPrint, MPInteger[] signature, byte[] salt)
|
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public static SignaturePacket | |
| public long | Returns: the creation time in millisReturn the creation time of the signature in milli-seconds. |
| public byte[] | Returns: fingerprint (digest prefix) of the signatureReturn the signature's fingerprint. |
| public int | |
| public SignatureSubpacket[] | |
| public int | |
| public long | |
| public byte[] | |
| public MPInteger[] | getSignature()
return the signature as a set of integers - note this is normalised to be the ASN.1 encoding of what appears in the signature packet. |
| public byte[] | Returns: uninterpreted signature bytes.Return the byte encoding of the signature section. |
| public byte[] | Returns: byte[]return the signature trailer that must be included with the data to reconstruct the signature |
| public int | |
| public SignatureSubpacket[] | |
| public int | |
| private void | parseSignature(BCPGInputStream
input stream which skipped the head of the signature in)Parse the algorithm-specific signature encoding. |
| private void | parseSubpackets(BCPGInputStream
input stream which skipped to after the hash algorithm octet in)Parse the hashed and unhashed signature subpacket areas of the signature. |
| private void | parseV2_V3(BCPGInputStream
input stream which already skipped over the version number in)Parse a version 2 or version 3 signature. |
| private void | parseV4_V5(BCPGInputStream
input stream which already skipped over the version number in)Parse a version 4 or version 5 signature. |
| private void | parseV6(BCPGInputStream
input stream which already skipped over the version number in)Parse a version 6 signature. |
| private Vector | |
| private void | |
| private void | setIssuerKeyId()
Iterate over the hashed and unhashed signature subpackets to identify either a |
| private void | writeSignatureSubpacketArray(ByteArrayOutputStream sOut, BCPGOutputStream pOut, SignatureSubpacket[] array)
|
| creationTime | back to summary |
|---|---|
| private long creationTime | |
| fingerPrint | back to summary |
|---|---|
| private byte[] fingerPrint | |
| hashAlgorithm | back to summary |
|---|---|
| private int hashAlgorithm | |
| hashedData | back to summary |
|---|---|
| private SignatureSubpacket[] hashedData | |
| keyAlgorithm | back to summary |
|---|---|
| private int keyAlgorithm | |
| keyID | back to summary |
|---|---|
| private long keyID | |
| salt | back to summary |
|---|---|
| private byte[] salt | |
| signature | back to summary |
|---|---|
| private MPInteger[] signature | |
| signatureEncoding | back to summary |
|---|---|
| private byte[] signatureEncoding | |
| signatureType | back to summary |
|---|---|
| private int signatureType | |
| unhashedData | back to summary |
|---|---|
| private SignatureSubpacket[] unhashedData | |
| version | back to summary |
|---|---|
| private int version | |
| VERSION_2 | back to summary |
|---|---|
| public static final int VERSION_2 | |
| VERSION_3 | back to summary |
|---|---|
| public static final int VERSION_3 | |
| VERSION_4 | back to summary |
|---|---|
| public static final int VERSION_4 | |
| VERSION_5 | back to summary |
|---|---|
| public static final int VERSION_5 | |
| VERSION_6 | back to summary |
|---|---|
| public static final int VERSION_6 | |
| SignaturePacket | back to summary |
|---|---|
| pack-priv SignaturePacket(BCPGInputStream in) throws IOException | |
| SignaturePacket | back to summary |
|---|---|
| pack-priv SignaturePacket(BCPGInputStream in, boolean newPacketFormat) throws IOException | |
| SignaturePacket | back to summary |
|---|---|
| public SignaturePacket(int signatureType, long keyID, int keyAlgorithm, int hashAlgorithm, SignatureSubpacket[] hashedData, SignatureSubpacket[] unhashedData, byte[] fingerPrint, MPInteger[] signature) Generate a version 4 signature packet. | |
| SignaturePacket | back to summary |
|---|---|
| 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. | |
| SignaturePacket | back to summary |
|---|---|
| public SignaturePacket(int version, int signatureType, long keyID, int keyAlgorithm, int hashAlgorithm, SignatureSubpacket[] hashedData, SignatureSubpacket[] unhashedData, byte[] fingerPrint, MPInteger[] signature) | |
| SignaturePacket | back to summary |
|---|---|
| public SignaturePacket(int version, int signatureType, long keyID, int keyAlgorithm, int hashAlgorithm, SignatureSubpacket[] hashedData, SignatureSubpacket[] unhashedData, byte[] fingerPrint, byte[] signatureEncoding, byte[] salt) | |
| SignaturePacket | back to summary |
|---|---|
| public SignaturePacket(int version, int signatureType, long keyID, int keyAlgorithm, int hashAlgorithm, SignatureSubpacket[] hashedData, SignatureSubpacket[] unhashedData, byte[] fingerPrint, MPInteger[] signature, byte[] salt) | |
| encode | back to summary |
|---|---|
| public void encode(BCPGOutputStream out) throws IOException Implements abstract org. | |
| fromByteArray | back to summary |
|---|---|
| public static SignaturePacket fromByteArray(byte[] data) throws IOException | |
| getCreationTime | back to summary |
|---|---|
| public long getCreationTime() Return the creation time of the signature in milli-seconds.
| |
| getFingerPrint | back to summary |
|---|---|
| public byte[] getFingerPrint() Return the signature's fingerprint.
| |
| getHashAlgorithm | back to summary |
|---|---|
| public int getHashAlgorithm() return the hashAlgorithm tag | |
| getHashedSubPackets | back to summary |
|---|---|
| public SignatureSubpacket[] getHashedSubPackets() | |
| getKeyAlgorithm | back to summary |
|---|---|
| public int getKeyAlgorithm() return the encryption algorithm tag | |
| getKeyID | back to summary |
|---|---|
| public long getKeyID() return the keyID
| |
| getSalt | back to summary |
|---|---|
| public byte[] getSalt() Return the signature's salt. Only for v6 signatures.
| |
| getSignature | back to summary |
|---|---|
| public MPInteger[] getSignature() return the signature as a set of integers - note this is normalised to be the
ASN.1 encoding of what appears in the signature packet.
Note, that Ed25519 and Ed448 returns null, as the raw signature is stored in signatureEncoding only.
For those, use | |
| getSignatureBytes | back to summary |
|---|---|
| public byte[] getSignatureBytes() Return the byte encoding of the signature section.
| |
| getSignatureTrailer | back to summary |
|---|---|
| public byte[] getSignatureTrailer() return the signature trailer that must be included with the data to reconstruct the signature
| |
| getSignatureType | back to summary |
|---|---|
| public int getSignatureType() return the signature type. | |
| getUnhashedSubPackets | back to summary |
|---|---|
| public SignatureSubpacket[] getUnhashedSubPackets() | |
| getVersion | back to summary |
|---|---|
| public int getVersion() get the version number | |
| parseSignature | back to summary |
|---|---|
| private void parseSignature(BCPGInputStream in) throws IOException Parse the algorithm-specific signature encoding. Ed25519 and Ed448 do not populate the signature MPInteger field, but instead read the raw signature to signatureEncoding directly.
| |
| parseSubpackets | back to summary |
|---|---|
| private void parseSubpackets(BCPGInputStream in) throws IOException Parse the hashed and unhashed signature subpacket areas of the signature. Version 4 and 5 signature encode the area length using 2 octets, while version 6 uses 4 octet lengths instead.
| |
| parseV2_V3 | back to summary |
|---|---|
| private void parseV2_V3(BCPGInputStream in) throws IOException Parse a version 2 or version 3 signature.
| |
| parseV4_V5 | back to summary |
|---|---|
| private void parseV4_V5(BCPGInputStream in) throws IOException Parse a version 4 or version 5 signature. The difference between version 4 and 5 is that a version 5 signature contains additional metadata.
| |
| parseV6 | back to summary |
|---|---|
| private void parseV6(BCPGInputStream in) throws IOException Parse a version 6 signature. Version 6 signatures do use 4 octet subpacket area length descriptors and contain an additional salt value (which may or may not be of size 0, LibrePGP and OpenPGP are in disagreement here).
| |
| readSignatureSubpacketVector | back to summary |
|---|---|
| private Vector | |
| setCreationTime | back to summary |
|---|---|
| private void setCreationTime() | |
| setIssuerKeyId | back to summary |
|---|---|
| private void setIssuerKeyId() Iterate over the hashed and unhashed signature subpackets to identify either a | |
| writeSignatureSubpacketArray | back to summary |
|---|---|
| private void writeSignatureSubpacketArray(ByteArrayOutputStream sOut, BCPGOutputStream pOut, SignatureSubpacket[] array) throws IOException | |