Package org.pgpainless.algorithm
Enum Class SignatureType
- All Implemented Interfaces:
Serializable
,Comparable<SignatureType>
,Constable
Enum that enlists all the Signature Types defined in rfc4880 section 5.2.1
See
PGPSignature
for comparison.- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionSignature of a binary document.Signature of a canonical text document.Casual certification of a User ID and Public-Key packet.Certification revocation signature This signature revokes an earlier User ID certification signature (signature class 0x10 through 0x13) or signatureDIRECT_KEY
.Signature directly on a key This signature is calculated directly on a key.Generic certification of a User ID and Public-Key packet.Key revocation signature The signature is calculated directly on the key being revoked.Persona certification of a User ID and Public-Key packet.Positive certification of a User ID and Public-Key packet.Primary Key Binding Signature This signature is a statement by a signing subkey, indicating that it is owned by the primary key and subkey.Standalone signature.Subkey Binding Signature.Subkey revocation signature The signature is calculated directly on the subkey being revoked.Third-Party Confirmation signature.Timestamp signature. -
Method Summary
Modifier and TypeMethodDescriptionint
getCode()
Return the numeric id of the signature type enum.static boolean
isRevocationSignature
(int signatureType) static boolean
isRevocationSignature
(SignatureType signatureType) static SignatureType
valueOf
(int code) Convert a numerical id into aSignatureType
.static SignatureType
Returns the enum constant of this class with the specified name.static SignatureType[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
BINARY_DOCUMENT
Signature of a binary document. This means the signer owns it, created it, or certifies that it has not been modified. -
CANONICAL_TEXT_DOCUMENT
Signature of a canonical text document. This means the signer owns it, created it, or certifies that it has not been modified. The signature is calculated over the text data with its line endings converted to<CR><LF>
. -
STANDALONE
Standalone signature. This signature is a signature of only its own subpacket contents. It is calculated identically to a signature over a zero-length binary document. Note that it doesn't make sense to have a V3 standalone signature. -
GENERIC_CERTIFICATION
Generic certification of a User ID and Public-Key packet. The issuer of this certification does not make any particular assertion as to how well the certifier has checked that the owner of the key is in fact the person described by the User ID. -
NO_CERTIFICATION
Persona certification of a User ID and Public-Key packet. The issuer of this certification has not done any verification of the claim that the owner of this key is the User ID specified. -
CASUAL_CERTIFICATION
Casual certification of a User ID and Public-Key packet. The issuer of this certification has done some casual verification of the claim of identity. -
POSITIVE_CERTIFICATION
Positive certification of a User ID and Public-Key packet. The issuer of this certification has done substantial verification of the claim of identity. -
SUBKEY_BINDING
Subkey Binding Signature. This signature is a statement by the top-level signing key that indicates that it owns the subkey. This signature is calculated directly on the primary key and subkey, and not on any User ID or other packets. A signature that binds a signing subkey MUST have an Embedded Signature subpacket in this binding signature that contains aPRIMARYKEY_BINDING
signature made by the signing subkey on the primary key and subkey. -
PRIMARYKEY_BINDING
Primary Key Binding Signature This signature is a statement by a signing subkey, indicating that it is owned by the primary key and subkey. This signature is calculated the same way as aSUBKEY_BINDING
signature: directly on the primary key and subkey, and not on any User ID or other packets. -
DIRECT_KEY
Signature directly on a key This signature is calculated directly on a key. It binds the information in the Signature subpackets to the key, and is appropriate to be used for subpackets that provide information about the key, such as the Revocation Key subpacket. It is also appropriate for statements that non-self certifiers want to make about the key itself, rather than the binding between a key and a name. -
KEY_REVOCATION
Key revocation signature The signature is calculated directly on the key being revoked. A revoked key is not to be used. Only revocation signatures by the key being revoked, or by an authorized revocation key, should be considered valid revocation signatures. -
SUBKEY_REVOCATION
Subkey revocation signature The signature is calculated directly on the subkey being revoked. A revoked subkey is not to be used. Only revocation signatures by the top-level signature key that is bound to this subkey, or by an authorized revocation key, should be considered valid revocation signatures. -
CERTIFICATION_REVOCATION
Certification revocation signature This signature revokes an earlier User ID certification signature (signature class 0x10 through 0x13) or signatureDIRECT_KEY
. It should be issued by the same key that issued the revoked signature or an authorized revocation key. The signature is computed over the same data as the certificate that it revokes, and should have a later creation date than that certificate. -
TIMESTAMP
Timestamp signature. This signature is only meaningful for the timestamp contained in it. -
THIRD_PARTY_CONFIRMATION
Third-Party Confirmation signature. This signature is a signature over some other OpenPGP Signature packet(s). It is analogous to a notary seal on the signed data. A third-party signature SHOULD include Signature Target subpacket(s) to give easy identification. Note that we really do mean SHOULD. There are plausible uses for this (such as a blind party that only sees the signature, not the key or source document) that cannot include a target subpacket.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
valueOf
Convert a numerical id into aSignatureType
.- Parameters:
code
- numeric id- Returns:
- signature type enum
- Throws:
IllegalArgumentException
- in case of an unmatched signature type code
-
getCode
public int getCode()Return the numeric id of the signature type enum.- Returns:
- numeric id
-
isRevocationSignature
public static boolean isRevocationSignature(int signatureType) -
isRevocationSignature
-