# Module: enums

### Members

#### (static, readonly) aead :Integer

RFC4880bis-04, section 9.6

##### Type:

- Integer

##### Properties:

Name | Type | Description
--- | --- | ---
`eax` | Integer |
`ocb` | Integer |
`experimentalGCM` | Integer |

Source:
  - enums.js, line 180

#### (static, readonly) armor :Integer

Armor type

##### Type:

- Integer

##### Properties:

Name | Type | Description
--- | --- | ---
`multipartSection` | Integer |
`multipartLast` | Integer |
`signed` | Integer |
`message` | Integer |
`publicKey` | Integer |
`privateKey` | Integer |
`signature` | Integer |

Source:
  - enums.js, line 409

#### (static, readonly) compression :Integer

RFC4880, section 9.3

##### Type:

- Integer

##### Properties:

Name | Type | Description
--- | --- | ---
`uncompressed` | Integer |
`zip` | Integer | RFC1951
`zlib` | Integer | RFC1950
`bzip2` | Integer |

Source:
  - enums.js, line 142

#### (static, readonly) curve :String

Maps curve names under various standards to one

##### Type:

- String

##### Properties:

Name | Type | Description
--- | --- | ---
`p256` | String | NIST P-256 Curve
`"P-256"` | String |
`secp256r1` | String |
`prime256v1` | String |
`"1.2.840.10045.3.1.7"` | String |
`2a8648ce3d030107` | String |
`2A8648CE3D030107` | String |
`p384` | String | NIST P-384 Curve
`"P-384"` | String |
`secp384r1` | String |
`"1.3.132.0.34"` | String |
`2b81040022` | String |
`2B81040022` | String |
`p521` | String | NIST P-521 Curve
`"P-521"` | String |
`secp521r1` | String |
`"1.3.132.0.35"` | String |
`2b81040023` | String |
`2B81040023` | String |
`secp256k1` | String | SECG SECP256k1 Curve
`"1.3.132.0.10"` | String |
`2b8104000a` | String |
`2B8104000A` | String |
`ED25519` | String | Ed25519
`ed25519` | String |
`Ed25519` | String |
`"1.3.6.1.4.1.11591.15.1"` | String |
`2b06010401da470f01` | String |
`2B06010401DA470F01` | String |
`X25519` | String | Curve25519
`cv25519` | String |
`curve25519` | String |
`Curve25519` | String |
`"1.3.6.1.4.1.3029.1.5.1"` | String |
`2b060104019755010501` | String |
`2B060104019755010501` | String |
`brainpoolP256r1` | String | BrainpoolP256r1 Curve
`"1.3.36.3.3.2.8.1.1.7"` | String |
`2b2403030208010107` | String |
`2B2403030208010107` | String |
`brainpoolP384r1` | String | BrainpoolP384r1 Curve
`"1.3.36.3.3.2.8.1.1.11"` | String |
`2b240303020801010b` | String |
`2B240303020801010B` | String |
`brainpoolP512r1` | String | BrainpoolP512r1 Curve
`"1.3.36.3.3.2.8.1.1.13"` | String |
`2b240303020801010d` | String |
`2B240303020801010D` | String |

Source:
  - enums.js, line 14
See:
  - ECC - GnuPG wiki

#### (static, readonly) features :Integer

RFC4880bis-04, section 5.2.3.25

##### Type:

- Integer

##### Properties:

Name | Type | Description
--- | --- | ---
`modificationDetection` | Integer | 0x01 - Modification Detection (packets 18 and 19)
`aead` | Integer | 0x02 - AEAD Encrypted Data Packet (packet 20) and version 5 Symmetric-Key Encrypted Session Key Packets (packet 3)
`v5Keys` | Integer | 0x04 - Version 5 Public-Key Packet format and corresponding new fingerprint format

Source:
  - enums.js, line 440

#### (static, readonly) hash :Integer

RFC4880, section 9.4

##### Type:

- Integer

##### Properties:

Name | Type | Description
--- | --- | ---
`md5` | Integer |
`sha1` | Integer |
`ripemd` | Integer |
`sha256` | Integer |
`sha384` | Integer |
`sha512` | Integer |
`sha224` | Integer |

Source:
  - enums.js, line 155

#### (static, readonly) keyFlags :Integer

Key flags

##### Type:

- Integer

##### Properties:

Name | Type | Description
--- | --- | ---
`certifyKeys` | Integer | 0x01 - This key may be used to certify other keys.
`signData` | Integer | 0x02 - This key may be used to sign data.
`encryptCommunication` | Integer | 0x04 - This key may be used to encrypt communications.
`encryptStorage` | Integer | 0x08 - This key may be used to encrypt storage.
`splitPrivateKey` | Integer | 0x10 - The private component of this key may have been split by a secret-sharing mechanism.
`authentication` | Integer | 0x20 - This key may be used for authentication.
`sharedPrivateKey` | Integer | 0x80 - The private component of this key may be in the possession of more than one person.

Source:
  - enums.js, line 386

#### (static, readonly) literal :Integer

Data types in the literal packet

##### Type:

- Integer

##### Properties:

Name | Type | Description
--- | --- | ---
`binary` | Integer | Binary data 'b'
`text` | Integer | Text data 't'
`utf8` | Integer | Utf8 data 'u'
`mime` | Integer | MIME message body part 'm'

Source:
  - enums.js, line 215

#### (static, readonly) packet :Integer

A list of packet types and numeric tags associated with them.

##### Type:

- Integer

##### Properties:

Name | Type | Description
--- | --- | ---
`publicKeyEncryptedSessionKey` | Integer |
`signature` | Integer |
`symEncryptedSessionKey` | Integer |
`onePassSignature` | Integer |
`secretKey` | Integer |
`publicKey` | Integer |
`secretSubkey` | Integer |
`compressedData` | Integer |
`symmetricallyEncryptedData` | Integer |
`marker` | Integer |
`literalData` | Integer |
`trust` | Integer |
`userID` | Integer |
`publicSubkey` | Integer |
`userAttribute` | Integer |
`symEncryptedIntegrityProtectedData` | Integer |
`modificationDetectionCode` | Integer |
`aeadEncryptedData` | Integer |

Source:
  - enums.js, line 190

#### (static, readonly) publicKey :Integer

RFC4880bis-04, section 9.1

##### Type:

- Integer

##### Properties:

Name | Type | Description
--- | --- | ---
`rsaEncryptSign` | Integer | RSA (Encrypt or Sign) [HAC]
`rsaEncrypt` | Integer | RSA (Encrypt only) [HAC]
`rsaSign` | Integer | RSA (Sign only) [HAC]
`elgamal` | Integer | Elgamal (Encrypt only) [ELGAMAL] [HAC]
`dsa` | Integer | DSA (Sign only) [FIPS186] [HAC]
`ecdh` | Integer | ECDH (Encrypt only) [RFC6637]
`ecdsa` | Integer | ECDSA (Sign only) [RFC6637]
`eddsa` | Integer | EdDSA (Sign only) [Draft RFC]
`aedh` | Integer | Reserved for AEDH
`aedsa` | Integer | Reserved for AEDSA

Source:
  - enums.js, line 97

#### (static, readonly) reasonForRevocation :Integer

RFC4880, section 5.2.3.23

##### Type:

- Integer

##### Properties:

Name | Type | Description
--- | --- | ---
`noReason` | Integer | No reason specified (key revocations or cert revocations)
`keySuperseded` | Integer | Key is superseded (key revocations)
`keyCompromised` | Integer | Key material has been compromised (key revocations)
`keyRetired` | Integer | Key is retired and no longer used (key revocations)
`userIDInvalid` | Integer | User ID information is no longer valid (cert revocations)

Source:
  - enums.js, line 423

#### (static, readonly) s2k :Integer

A string to key specifier type

##### Type:

- Integer

##### Properties:

Name | Type | Description
--- | --- | ---
`simple` | Integer |
`salted` | Integer |
`iterated` | Integer |
`gnu` | Integer |

Source:
  - enums.js, line 86

#### (static, readonly) signature :Integer

One pass signature packet type

##### Type:

- Integer

##### Properties:

Name | Type | Description
--- | --- | ---
`binary` | Integer | 0x00: Signature of a binary document.
`text` | Integer | 0x01: Signature of a canonical text document. Canonicalyzing the document by converting line endings.
`standalone` | Integer | 0x02: Standalone signature. This signature is a signature of only its own subpacket contents. It is calculated identically to a signature over a zero-lengh binary document. Note that it doesn't make sense to have a V3 standalone signature.
`certGeneric` | Integer | 0x10: 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.
`certPersona` | Integer | 0x11: 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.
`certCasual` | Integer | 0x12: 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.
`certPositive` | Integer | 0x13: Positive certification of a User ID and Public-Key packet. The issuer of this certification has done substantial verification of the claim of identity. Most OpenPGP implementations make their "key signatures" as 0x10 certifications. Some implementations can issue 0x11-0x13 certifications, but few differentiate between the types.
`certRevocation` | Integer | 0x30: Certification revocation signature This signature revokes an earlier User ID certification signature (signature class 0x10 through 0x13) or direct-key signature (0x1F). 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.
`subkeyBinding` | Integer | 0x18: 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 a 0x19 signature made by the signing subkey on the primary key and subkey.
`keyBinding` | Integer | 0x19: 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 a 0x18 signature: directly on the primary key and subkey, and not on any User ID or other packets. When a signature is made over a key, the hash data starts with the octet 0x99, followed by a two-octet length of the key, and then body of the key packet. (Note that this is an old-style packet header for a key packet with two-octet length.) A subkey binding signature (type 0x18) or primary key binding signature (type 0x19) then hashes the subkey using the same format as the main key (also using 0x99 as the first octet).
`key` | Integer | 0x1F: 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.
`keyRevocation` | Integer | 0x20: 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.a
`subkeyRevocation` | Integer | 0x28: 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. Key revocation signatures (types 0x20 and 0x28) hash only the key being revoked.
`timestamp` | Integer | 0x40: Timestamp signature. This signature is only meaningful for the timestamp contained in it.
`thirdParty` | Integer | 0x50: 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.

Source:
  - enums.js, line 231

#### (static, readonly) signatureSubpacket :Integer

Signature subpacket type

##### Type:

- Integer

##### Properties:

Name | Type | Description
--- | --- | ---
`signatureCreationTime` | Integer |
`signatureExpirationTime` | Integer |
`exportableCertification` | Integer |
`trustSignature` | Integer |
`regularExpression` | Integer |
`revocable` | Integer |
`keyExpirationTime` | Integer |
`placeholderBackwardsCompatibility` | Integer |
`preferredSymmetricAlgorithms` | Integer |
`revocationKey` | Integer |
`issuer` | Integer |
`notationData` | Integer |
`preferredHashAlgorithms` | Integer |
`preferredCompressionAlgorithms` | Integer |
`keyServerPreferences` | Integer |
`preferredKeyServer` | Integer |
`primaryUserID` | Integer |
`policyURI` | Integer |
`keyFlags` | Integer |
`signersUserID` | Integer |
`reasonForRevocation` | Integer |
`features` | Integer |
`signatureTarget` | Integer |
`embeddedSignature` | Integer |
`issuerFingerprint` | Integer |
`preferredAEADAlgorithms` | Integer |

Source:
  - enums.js, line 353

#### (static, readonly) symmetric :Integer

RFC4880, section 9.2

##### Type:

- Integer

##### Properties:

Name | Type | Description
--- | --- | ---
`plaintext` | Integer |
`idea` | Integer | Not implemented!
`tripledes` | Integer |
`cast5` | Integer |
`blowfish` | Integer |
`aes128` | Integer |
`aes192` | Integer |
`aes256` | Integer |
`twofish` | Integer |

Source:
  - enums.js, line 125

#### (static) webHash :String

A list of hash names as accepted by webCrypto functions. Parameters, algo

##### Type:

- String

##### Properties:

Name | Type | Description
--- | --- | ---
`"SHA-1"` | String |
`"SHA-256"` | String |
`"SHA-384"` | String |
`"SHA-512"` | String |

Source:
  - enums.js, line 169

### Methods

#### (static) read(type, e) → {String}

Converts enum integer value to the corresponding string, if it exists.

##### Parameters:

Name | Type | Description
--- | --- | ---
`type` | Object | target enum type
`e` | Integer | value to convert

Source:
  - enums.js, line 477

##### Throws:

if the value is invalid

Type
  Error

##### Returns:

name of enum value if it exists

Type
  String

#### (static) write(type, e) → {Integer}

Asserts validity of given value and converts from string/integer to integer.

##### Parameters:

Name | Type | Description
--- | --- | ---
`type` | Object | target enum type
`e` | String | Integer | value to check and/or convert

Source:
  - enums.js, line 458

##### Throws:

if the value is invalid

Type
  Error

##### Returns:

enum value if it exists

Type
  Integer