Utilities for uncompressing and base64 decoding
Class for gunzipping, unzipping and base64 decoding of files.
It is used for reading GEONExT, Geogebra and Intergeo files.
@@ -78,7 +78,7 @@ The code is based on the source code for gunzip.c by Pasi Ojala
Source:
-
openpgp.js, line 10988
+
openpgp.js, line 10985
@@ -157,7 +157,7 @@ The code is based on the source code for gunzip.c by Pasi Ojala
- the default config object which is used if no
-configuration was in place
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Source:
-
openpgp.js, line 10257
-
-
-
-
-
-
-
@@ -1239,7 +1142,7 @@ warranty of any kind.
Source:
-
openpgp.js, line 3487
+
openpgp.js, line 3480
@@ -1423,7 +1326,7 @@ blockcipher to decrypt a message
Source:
-
openpgp.js, line 9029
+
openpgp.js, line 9022
@@ -1636,7 +1539,7 @@ using the specified blockcipher to encrypt a message
Source:
-
openpgp.js, line 8892
+
openpgp.js, line 8885
@@ -1802,7 +1705,7 @@ using the specified blockcipher to encrypt a message
Source:
-
openpgp.js, line 8988
+
openpgp.js, line 8981
@@ -1830,73 +1733,6 @@ using the specified blockcipher to encrypt a message
-
-
-
-
-
-
openpgp_config
-
-
-
-
-
-
-
- Implementation of the GPG4Browsers config object
-
-This object contains configuration values and implements
-storing and retrieving configuration them from HTML5 local storage.
-
-This object can be accessed after calling openpgp.init()
-using openpgp.config
-Stored config parameters can be accessed using
-openpgp.config.config
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Source:
-
openpgp.js, line 10250
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -2036,7 +1872,7 @@ the specified secretMPIs of the private key and the specified algorithm.
Source:
-
openpgp.js, line 9197
+
openpgp.js, line 9190
@@ -2185,7 +2021,7 @@ and the specified algorithm.
Source:
-
openpgp.js, line 9165
+
openpgp.js, line 9158
@@ -2255,7 +2091,7 @@ openpgp_type_mpi is returned; otherwise null
Source:
-
openpgp.js, line 9537
+
openpgp.js, line 9530
@@ -2375,7 +2211,7 @@ openpgp_type_mpi is returned; otherwise null
Source:
-
openpgp.js, line 9280
+
openpgp.js, line 9273
@@ -2487,7 +2323,7 @@ openpgp_type_mpi is returned; otherwise null
Source:
-
openpgp.js, line 9425
+
openpgp.js, line 9418
@@ -2599,7 +2435,7 @@ openpgp_type_mpi is returned; otherwise null
Source:
-
openpgp.js, line 9228
+
openpgp.js, line 9221
@@ -2730,7 +2566,7 @@ size of the cipher
Source:
-
openpgp.js, line 9464
+
openpgp.js, line 9457
@@ -2842,7 +2678,7 @@ size of the cipher
Source:
-
openpgp.js, line 9494
+
openpgp.js, line 9487
@@ -2954,7 +2790,7 @@ size of the cipher
Source:
-
openpgp.js, line 9450
+
openpgp.js, line 9443
@@ -3084,7 +2920,7 @@ size of the cipher
Source:
-
openpgp.js, line 9474
+
openpgp.js, line 9467
@@ -3214,7 +3050,7 @@ size of the cipher
Source:
-
openpgp.js, line 9391
+
openpgp.js, line 9384
@@ -3362,7 +3198,7 @@ size of the cipher
Source:
-
openpgp.js, line 9251
+
openpgp.js, line 9244
@@ -3546,7 +3382,7 @@ size of the cipher
Source:
-
openpgp.js, line 9353
+
openpgp.js, line 9346
@@ -3714,7 +3550,7 @@ otherwise use without the resync (for MDC encrypted data)
Source:
-
openpgp.js, line 8826
+
openpgp.js, line 8819
@@ -3902,7 +3738,7 @@ to retrieve that string
Source:
-
openpgp.js, line 8792
+
openpgp.js, line 8785
@@ -4082,7 +3918,7 @@ to retrieve that string
Source:
-
openpgp.js, line 9306
+
openpgp.js, line 9299
@@ -5279,986 +5115,6 @@ This function escapes HTML characters within a string. This is used to prevent X
-
-
-
-
-
-
openpgp_packet_compressed
-
-
-
-
-
-
-
- Implementation of the Compressed Data Packet (Tag 8)
-
-RFC4880 5.6:
-The Compressed Data packet contains compressed data. Typically, this
-packet is found as the contents of an encrypted packet, or following
-a Signature or One-Pass Signature packet, and contains a literal data
-packet.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Source:
-
openpgp.js, line 2532
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
openpgp_packet_encrypteddata
-
-
-
-
-
-
-
- Implementation of the Symmetrically Encrypted Data Packet (Tag 9)
-
-RFC4880 5.7: The Symmetrically Encrypted Data packet contains data encrypted
-with a symmetric-key algorithm. When it has been decrypted, it contains other
-packets (usually a literal data packet or compressed data packet, but in
-theory other Symmetrically Encrypted Data packets or sequences of packets
-that form whole OpenPGP messages).
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Source:
-
openpgp.js, line 1868
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
openpgp_packet_encryptedintegrityprotecteddata
-
-
-
-
-
-
-
- Implementation of the Sym. Encrypted Integrity Protected Data Packet (Tag 18)
-
-RFC4880 5.13: The Symmetrically Encrypted Integrity Protected Data packet is
-a variant of the Symmetrically Encrypted Data packet. It is a new feature
-created for OpenPGP that addresses the problem of detecting a modification to
-encrypted data. It is used in combination with a Modification Detection Code
-packet.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Source:
-
openpgp.js, line 963
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
openpgp_packet_encryptedsessionkey
-
-
-
-
-
-
-
- Public-Key Encrypted Session Key Packets (Tag 1)
-
-RFC4880 5.1: A Public-Key Encrypted Session Key packet holds the session key
-used to encrypt a message. Zero or more Public-Key Encrypted Session Key
-packets and/or Symmetric-Key Encrypted Session Key packets may precede a
-Symmetrically Encrypted Data Packet, which holds an encrypted message. The
-message is encrypted with the session key, and the session key is itself
-encrypted and stored in the Encrypted Session Key packet(s). The
-Symmetrically Encrypted Data Packet is preceded by one Public-Key Encrypted
-Session Key packet for each OpenPGP key to which the message is encrypted.
-The recipient of the message finds a session key that is encrypted to their
-public key, decrypts the session key, and then uses the session key to
-decrypt the message.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Source:
-
openpgp.js, line 1540
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
openpgp_packet_keymaterial
-
-
-
-
-
-
-
- Implementation of the Key Material Packet (Tag 5,6,7,14)
-
-RFC4480 5.5:
-A key material packet contains all the information about a public or
-private key. There are four variants of this packet type, and two
-major versions. Consequently, this section is complex.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Source:
-
openpgp.js, line 2695
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
openpgp_packet_literaldata
-
-
-
-
-
-
-
- Implementation of the Literal Data Packet (Tag 11)
-
-RFC4880 5.9: A Literal Data packet contains the body of a message; data that
-is not to be further interpreted.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Source:
-
openpgp.js, line 1765
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
openpgp_packet_marker
-
-
-
-
-
-
-
- Implementation of the strange "Marker packet" (Tag 10)
-
-RFC4880 5.8: An experimental version of PGP used this packet as the Literal
-packet, but no released version of PGP generated Literal packets with this
-tag. With PGP 5.x, this packet has been reassigned and is reserved for use as
-the Marker packet.
-
-Such a packet MUST be ignored when received.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Source:
-
openpgp.js, line 145
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
openpgp_packet_modificationdetectioncode
-
-
-
-
-
-
-
- Implementation of the Modification Detection Code Packet (Tag 19)
-
-RFC4880 5.14: The Modification Detection Code packet contains a SHA-1 hash of
-plaintext data, which is used to detect message modification. It is only used
-with a Symmetrically Encrypted Integrity Protected Data packet. The
-Modification Detection Code packet MUST be the last packet in the plaintext
-data that is encrypted in the Symmetrically Encrypted Integrity Protected
-Data packet, and MUST appear in no other place.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Source:
-
openpgp.js, line 1123
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
openpgp_packet_onepasssignature
-
-
-
-
-
-
-
- Implementation of the One-Pass Signature Packets (Tag 4)
-
-RFC4880 5.4:
-The One-Pass Signature packet precedes the signed data and contains
-enough information to allow the receiver to begin calculating any
-hashes needed to verify the signature. It allows the Signature
-packet to be placed at the end of the message, so that the signer
-can compute the entire signed message in one pass.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Source:
-
openpgp.js, line 28
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
openpgp_packet_signature
-
-
-
-
-
-
-
- Implementation of the Signature Packet (Tag 2)
-
-RFC4480 5.2:
-A Signature packet describes a binding between some public key and
-some data. The most common signatures are a signature of a file or a
-block of text, and a signature that is a certification of a User ID.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Source:
-
openpgp.js, line 206
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
openpgp_packet_userattribute
-
-
-
-
-
-
-
- The User Attribute packet is a variation of the User ID packet. It
- is capable of storing more types of data than the User ID packet,
- which is limited to text. Like the User ID packet, a User Attribute
- packet may be certified by the key owner ("self-signed") or any other
- key owner who cares to certify it. Except as noted, a User Attribute
- packet may be used anywhere that a User ID packet may be used.
-
- While User Attribute packets are not a required part of the OpenPGP
- standard, implementations SHOULD provide at least enough
- compatibility to properly handle a certification signature on the
- User Attribute packet. A simple way to do this is by treating the
- User Attribute packet as a User ID packet with opaque contents, but
- an implementation may use any method desired.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Source:
-
openpgp.js, line 1977
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
openpgp_packet_userid
-
-
-
-
-
-
-
- A User ID packet consists of UTF-8 text that is intended to represent
-the name and email address of the key holder. By convention, it
-includes an RFC 2822 [RFC2822] mail name-addr, but there are no
-restrictions on its content. The packet length in the header
-specifies the length of the User ID.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Source:
-
openpgp.js, line 1199
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
openpgp_type_keyid
-
-
-
-
-
-
-
- Implementation of type key id (RFC4880 3.3)
- A Key ID is an eight-octet scalar that identifies a key.
- Implementations SHOULD NOT assume that Key IDs are unique. The
- section "Enhanced Key Formats" below describes how Key IDs are
- formed.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Source:
-
openpgp.js, line 12496
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
openpgp_type_mpi
-
-
-
-
-
-
-
- Implementation of type MPI (RFC4880 3.2)
- Multiprecision integers (also called MPIs) are unsigned integers used
- to hold large integers such as the ones used in cryptographic
- calculations.
- An MPI consists of two pieces: a two-octet scalar that is the length
- of the MPI in bits followed by a string of octets that contain the
- actual integer.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Source:
-
openpgp.js, line 12371
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
openpgp_type_s2k
-
-
-
-
-
-
-
- Implementation of the String-to-key specifier (RFC4880 3.7)
-String-to-key (S2K) specifiers are used to convert passphrase strings
- into symmetric-key encryption/decryption keys. They are used in two
- places, currently: to encrypt the secret part of private keys in the
- private keyring, and to convert passphrases to encryption keys for
- symmetrically encrypted messages.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Source:
-
openpgp.js, line 12544
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -7368,13 +6224,13 @@ are automatically converted to HTML line feeds ' '.
diff --git a/doc/index.html b/doc/index.html
index 5968c523..abcd7a7e 100644
--- a/doc/index.html
+++ b/doc/index.html
@@ -62,7 +62,9 @@
-
Utilities for uncompressing and base64 decoding
+
The openpgp base class should provide all of the functionality
+to consume the openpgp.js library. All additional classes are documented
+for extending and developing on top of the base library.
@@ -85,7 +87,7 @@
Source:
-
openpgp.js, line 10955
+
openpgp.js, line 9565
@@ -127,13 +129,13 @@
diff --git a/doc/openpgp.html b/doc/openpgp.html
index 3f27f34d..5cec5ebe 100644
--- a/doc/openpgp.html
+++ b/doc/openpgp.html
@@ -78,7 +78,7 @@ from the beginning. To use this library call "openpgp.init()"
Source:
-
openpgp.js, line 9579
+
openpgp.js, line 9578
@@ -243,7 +243,7 @@ from the beginning. To use this library call "openpgp.init()"
Source:
-
openpgp.js, line 9926
+
openpgp.js, line 9925
@@ -322,7 +322,7 @@ from the beginning. To use this library call "openpgp.init()"
Source:
-
openpgp.js, line 9588
+
openpgp.js, line 9587
@@ -438,7 +438,7 @@ returns an array of message objects
Source:
-
openpgp.js, line 9679
+
openpgp.js, line 9678
@@ -568,7 +568,7 @@ the private key(s)
Source:
-
openpgp.js, line 9649
+
openpgp.js, line 9648
@@ -698,7 +698,7 @@ the public key(s)
Source:
-
openpgp.js, line 9603
+
openpgp.js, line 9602
@@ -849,7 +849,7 @@ keys to be used to encrypt the message
Source:
-
openpgp.js, line 9870
+
openpgp.js, line 9869
@@ -1021,7 +1021,7 @@ with the specified private key.
Source:
-
openpgp.js, line 9813
+
openpgp.js, line 9812
@@ -1171,7 +1171,7 @@ key to be used to sign the message
Source:
-
openpgp.js, line 9913
+
openpgp.js, line 9912
@@ -1231,13 +1231,13 @@ key to be used to sign the message
diff --git a/doc/openpgp_config.html b/doc/openpgp_config.html
new file mode 100644
index 00000000..ee08b0d8
--- /dev/null
+++ b/doc/openpgp_config.html
@@ -0,0 +1,392 @@
+
+
+
+
+ JSDoc: Class: openpgp_config
+
+
+
+
+
+
+
+
+
+
+
+
+
Class: openpgp_config
+
+
+
+
+
+
+
+
+
+ openpgp_config
+
+
+
Implementation of the GPG4Browsers config object
+
+
+
+
+
+
+
+
+
+
+
new openpgp_config
+
+
+
+
+
+
+
+ This object contains configuration values and implements
+storing and retrieving configuration them from HTML5 local storage.
+
+This object can be accessed after calling openpgp.init()
+using openpgp.config
+Stored config parameters can be accessed using
+openpgp.config.config
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Source:
+
openpgp.js, line 10250
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Members
+
+
+
+
+
debug
+
+
+
+
+
+
+ if enabled, debug messages will be printed
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Source:
+
openpgp.js, line 10289
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
default_config
+
+
+
+
+
+
+ the default config object which is used if no
+configuration was in place
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Source:
+
openpgp.js, line 10257
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Methods
+
+
+
+
+
<inner> read
+
+
+
+
+
+
+
+ reads the config out of the HTML5 local storage
+and initializes the object config.
+if config is null the default config will be used
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Source:
+
openpgp.js, line 10276
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Returns:
+
+
+
+ [void]
+
+
+
+
+
+
+
+
+
+
+
+
+
<inner> write
+
+
+
+
+
+
+
+ writes the config to HTML5 local storage
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Source:
+
openpgp.js, line 10295
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Returns:
+
+
+
+ [void]
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/doc/openpgp_keyring.html b/doc/openpgp_keyring.html
index 64793a69..50359e18 100644
--- a/doc/openpgp_keyring.html
+++ b/doc/openpgp_keyring.html
@@ -1637,13 +1637,13 @@ The privateKeys array and publicKeys array gets Stringified using JSON
diff --git a/doc/openpgp_msg_message.html b/doc/openpgp_msg_message.html
index 388acfba..50c9f6e6 100644
--- a/doc/openpgp_msg_message.html
+++ b/doc/openpgp_msg_message.html
@@ -73,7 +73,7 @@
Source:
-
openpgp.js, line 12199
+
openpgp.js, line 12196
@@ -181,7 +181,7 @@ MDC will be verified as well as message signatures
Implementation of the Compressed Data Packet (Tag 8)
+
+RFC4880 5.6:
+The Compressed Data packet contains compressed data. Typically, this
+packet is found as the contents of an encrypted packet, or following
+a Signature or One-Pass Signature packet, and contains a literal data
+packet.
+
+
+
+
+
+
+
+
+
+
+
new openpgp_packet_compressed
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Source:
+
openpgp.js, line 2519
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Methods
+
+
+
+
+
<inner> compress
+
+
+
+
+
+
+
+ Compress the packet data (member decompressedData)
+
+
+
+
+
+
+
Parameters:
+
+
+
+
+
+
+
Name
+
+
+
Type
+
+
+
+
+
+
Description
+
+
+
+
+
+
+
+
+
type
+
+
+
+
+ integer
+
+
+
+
+
+
+
+
+
algorithm to be used // See RFC 4880 9.3
+
+
+
+
+
+
+
data
+
+
+
+
+ String
+
+
+
+
+
+
+
+
+
data to be compressed
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Source:
+
openpgp.js, line 2599
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Returns:
+
+
+
+ The compressed data stored in attribute compressedData
+
+
+
+
+
+
+
+ Type
+
+
+
+ String
+
+
+
+
+
+
+
+
+
+
+
+
+
<inner> decompress
+
+
+
+
+
+
+
+ decompression method for decompressing the compressed data
+read by read_packet
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Source:
+
openpgp.js, line 2543
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Returns:
+
+
+
+ the decompressed data
+
+
+
+
+
+
+
+ Type
+
+
+
+ String
+
+
+
+
+
+
+
+
+
+
+
+
+
<inner> read_packet
+
+
+
+
+
+
+
+ parsing function for the packet.
+
+
+
+
+
+
+
Parameters:
+
+
+
+
+
+
+
Name
+
+
+
Type
+
+
+
+
+
+
Description
+
+
+
+
+
+
+
+
+
input
+
+
+
+
+ string
+
+
+
+
+
+
+
+
+
payload of a tag 8 packet
+
+
+
+
+
+
+
position
+
+
+
+
+ integer
+
+
+
+
+
+
+
+
+
position to start reading from the input string
+
+
+
+
+
+
+
len
+
+
+
+
+ integer
+
+
+
+
+
+
+
+
+
length of the packet or the remaining length of input at position
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Source:
+
openpgp.js, line 2529
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Returns:
+
+
+
+ object representation
+
+
+
+
+
+
+
+ Type
+
+
+
+ openpgp_packet_compressed
+
+
+
+
+
+
+
+
+
+
+
+
+
<inner> toString
+
+
+
+
+
+
+
+ pretty printing the packet (useful for debug purposes)
+
Implementation of the Symmetrically Encrypted Data Packet (Tag 9)
+
+RFC4880 5.7: The Symmetrically Encrypted Data packet contains data encrypted
+with a symmetric-key algorithm. When it has been decrypted, it contains other
+packets (usually a literal data packet or compressed data packet, but in
+theory other Symmetrically Encrypted Data packets or sequences of packets
+that form whole OpenPGP messages).
+
+
+
+
+
+
+
+
+
+
+
new openpgp_packet_encrypteddata
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Source:
+
openpgp.js, line 1860
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Methods
+
+
+
+
+
<inner> decrypt_sym
+
+
+
+
+
+
+
+ symmetrically decrypt the packet data
+
+
+
+
+
+
+
Parameters:
+
+
+
+
+
+
+
Name
+
+
+
Type
+
+
+
+
+
+
Description
+
+
+
+
+
+
+
+
+
symmetric_algorithm_type
+
+
+
+
+ integer
+
+
+
+
+
+
+
+
+
symmetric key algorithm to use // See RFC4880 9.2
+
+
+
+
+
+
+
key
+
+
+
+
+ String
+
+
+
+
+
+
+
+
+
key as string with the corresponding length to the
+ algorithm
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Source:
+
openpgp.js, line 1894
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Returns:
+
+
+
+ the decrypted data;
+
+
+
+
+
+
+
+
+
+
+
+
+
<inner> read_packet
+
+
+
+
+
+
+
+ parsing function for the packet.
+
+
+
+
+
+
+
Parameters:
+
+
+
+
+
+
+
Name
+
+
+
Type
+
+
+
+
+
+
Description
+
+
+
+
+
+
+
+
+
input
+
+
+
+
+ string
+
+
+
+
+
+
+
+
+
payload of a tag 9 packet
+
+
+
+
+
+
+
position
+
+
+
+
+ integer
+
+
+
+
+
+
+
+
+
position to start reading from the input string
+
+
+
+
+
+
+
len
+
+
+
+
+ integer
+
+
+
+
+
+
+
+
+
length of the packet or the remaining length of
+ input at position
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Source:
+
openpgp.js, line 1875
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Returns:
+
+
+
+ object representation
+
+
+
+
+
+
+
+ Type
+
+
+
+ openpgp_packet_encrypteddata
+
+
+
+
+
+
+
+
+
+
+
+
+
<inner> write_packet
+
+
+
+
+
+
+
+ Creates a string representation of the packet
+
+
+
+
+
+
+
Parameters:
+
+
+
+
+
+
+
Name
+
+
+
Type
+
+
+
+
+
+
Description
+
+
+
+
+
+
+
+
+
algo
+
+
+
+
+ Integer
+
+
+
+
+
+
+
+
+
symmetric key algorithm to use // See RFC4880 9.2
+
+
+
+
+
+
+
key
+
+
+
+
+ String
+
+
+
+
+
+
+
+
+
key as string with the corresponding length to the
+ algorithm
Implementation of the Sym. Encrypted Integrity Protected Data Packet (Tag 18)
+
+RFC4880 5.13: The Symmetrically Encrypted Integrity Protected Data packet is
+a variant of the Symmetrically Encrypted Data packet. It is a new feature
+created for OpenPGP that addresses the problem of detecting a modification to
+encrypted data. It is used in combination with a Modification Detection Code
+packet.
+
+
+
+
+
+
+
+
+
+
+
new openpgp_packet_encryptedintegrityprotecteddata
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Source:
+
openpgp.js, line 968
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Methods
+
+
+
+
+
<inner> decrypt
+
+
+
+
+
+
+
+ Decrypts the encrypted data contained in this object read_packet must
+have been called before
+
+
+
+
+
+
+
Parameters:
+
+
+
+
+
+
+
Name
+
+
+
Type
+
+
+
+
+
+
Description
+
+
+
+
+
+
+
+
+
symmetric_algorithm_type
+
+
+
+
+ integer
+
+
+
+
+
+
+
+
+
the selected symmetric encryption algorithm to be used
+
+
+
+
+
+
+
key
+
+
+
+
+ String
+
+
+
+
+
+
+
+
+
the key of cipher blocksize length to be used
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Source:
+
openpgp.js, line 1054
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Returns:
+
+
+
+ the decrypted data of this packet
+
+
+
+
+
+
+
+
+
+
+
+
+
<inner> read_packet
+
+
+
+
+
+
+
+ parsing function for the packet.
+
+
+
+
+
+
+
Parameters:
+
+
+
+
+
+
+
Name
+
+
+
Type
+
+
+
+
+
+
Description
+
+
+
+
+
+
+
+
+
input
+
+
+
+
+ string
+
+
+
+
+
+
+
+
+
payload of a tag 18 packet
+
+
+
+
+
+
+
position
+
+
+
+
+ integer
+
+
+
+
+
+
+
+
+
position to start reading from the input string
+
+
+
+
+
+
+
len
+
+
+
+
+ integer
+
+
+
+
+
+
+
+
+
length of the packet or the remaining length of
+ input at position
Public-Key Encrypted Session Key Packets (Tag 1)
+
+RFC4880 5.1: A Public-Key Encrypted Session Key packet holds the session key
+used to encrypt a message. Zero or more Public-Key Encrypted Session Key
+packets and/or Symmetric-Key Encrypted Session Key packets may precede a
+Symmetrically Encrypted Data Packet, which holds an encrypted message. The
+message is encrypted with the session key, and the session key is itself
+encrypted and stored in the Encrypted Session Key packet(s). The
+Symmetrically Encrypted Data Packet is preceded by one Public-Key Encrypted
+Session Key packet for each OpenPGP key to which the message is encrypted.
+The recipient of the message finds a session key that is encrypted to their
+public key, decrypts the session key, and then uses the session key to
+decrypt the message.
+
+
+
+
+
+
+
+
+
+
+
new openpgp_packet_encryptedsessionkey
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Source:
+
openpgp.js, line 1542
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Methods
+
+
+
+
+
<inner> decrypt
+
+
+
+
+
+
+
+ Decrypts the session key (only for public key encrypted session key
+packets (tag 1)
+
+ parsing function for a publickey encrypted session key packet (tag 1).
+
+
+
+
+
+
+
Parameters:
+
+
+
+
+
+
+
Name
+
+
+
Type
+
+
+
+
+
+
Description
+
+
+
+
+
+
+
+
+
input
+
+
+
+
+ string
+
+
+
+
+
+
+
+
+
payload of a tag 1 packet
+
+
+
+
+
+
+
position
+
+
+
+
+ integer
+
+
+
+
+
+
+
+
+
position to start reading from the input string
+
+
+
+
+
+
+
len
+
+
+
+
+ integer
+
+
+
+
+
+
+
+
+
length of the packet or the remaining length of
+ input at position
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Source:
+
openpgp.js, line 1553
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Returns:
+
+
+
+ object representation
+
+
+
+
+
+
+
+ Type
+
+
+
+ openpgp_packet_encrypteddata
+
+
+
+
+
+
+
+
+
+
+
+
+
<inner> read_symmetric_key_packet
+
+
+
+
+
+
+
+ parsing function for a symmetric encrypted session key packet (tag 3).
+
+
+
+
+
+
+
Parameters:
+
+
+
+
+
+
+
Name
+
+
+
Type
+
+
+
+
+
+
Description
+
+
+
+
+
+
+
+
+
input
+
+
+
+
+ string
+
+
+
+
+
+
+
+
+
payload of a tag 1 packet
+
+
+
+
+
+
+
position
+
+
+
+
+ integer
+
+
+
+
+
+
+
+
+
position to start reading from the input string
+
+
+
+
+
+
+
len
+
+
+
+
+ integer
+
+
+
+
+
+
+
+
+
length of the packet or the remaining length of
+ input at position
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Source:
+
openpgp.js, line 1641
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Returns:
+
+
+
+ object representation
+
+
+
+
+
+
+
+ Type
+
+
+
+ openpgp_packet_encrypteddata
+
+
+
+
+
+
+
+
+
+
+
+
+
<inner> toString
+
+
+
+
+
+
+
+ Creates a string representation of this object (useful for debug
+purposes)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Source:
+
openpgp.js, line 1700
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Returns:
+
+
+
+ the string containing a openpgp description
+
+
+
+
+
+
+
+
+
+
+
+
+
<inner> write_pub_key_packet
+
+
+
+
+
+
+
+ create a string representation of a tag 1 packet
+
+
+
+
+
+
+
Parameters:
+
+
+
+
+
+
+
Name
+
+
+
Type
+
+
+
+
+
+
Description
+
+
+
+
+
+
+
+
+
publicKeyId
+
+
+
+
+ String
+
+
+
+
+
+
+
+
+
the public key id corresponding to publicMPIs key as string
+
+
+
+
+
+
+
publicMPIs
+
+
+
+
+ Array[openpgp_type_mpi]
+
+
+
+
+
+
+
+
+
multiprecision integer objects describing the public key
+
+
+
+
+
+
+
pubalgo
+
+
+
+
+ integer
+
+
+
+
+
+
+
+
+
the corresponding public key algorithm // See RFC4880 9.1
+
+
+
+
+
+
+
symmalgo
+
+
+
+
+ integer
+
+
+
+
+
+
+
+
+
the symmetric cipher algorithm used to encrypt the data within
+ an encrypteddatapacket or encryptedintegrityprotecteddatapacket
+ following this packet //See RFC4880 9.2
+
+
+
+
+
+
+
sessionkey
+
+
+
+
+ String
+
+
+
+
+
+
+
+
+
a string of randombytes representing the session key
Implementation of the Key Material Packet (Tag 5,6,7,14)
+
+RFC4480 5.5:
+A key material packet contains all the information about a public or
+private key. There are four variants of this packet type, and two
+major versions. Consequently, this section is complex.
+
+
+
+
+
+
+
+
+
+
+
new openpgp_packet_keymaterial
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Source:
+
openpgp.js, line 2683
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Methods
+
+
+
+
+
<inner> decryptSecretMPIs
+
+
+
+
+
+
+
+ Decrypts the private key MPIs which are needed to use the key.
+openpgp_packet_keymaterial.hasUnencryptedSecretKeyData should be false otherwise
+a call to this function is not needed
+
+
+
+
+
+
+
Parameters:
+
+
+
+
+
+
+
Name
+
+
+
Type
+
+
+
+
+
+
Description
+
+
+
+
+
+
+
+
+
str_passphrase
+
+
+
+
+
+
+
+
+
+
+
the passphrase for this private key as string
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Source:
+
openpgp.js, line 3024
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Returns:
+
+
+
+ true if the passphrase was correct; false if not
+
+
+
+
+
+
+
+
+
+
+
+
+
<inner> getFingerprint
+
+
+
+
+
+
+
+ calculates the fingerprint of the key
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Source:
+
openpgp.js, line 3334
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Returns:
+
+
+
+ a string containing the fingerprint
+
+
+
+
+
+
+
+ Type
+
+
+
+ String
+
+
+
+
+
+
+
+
+
+
+
+
+
<inner> getKeyId
+
+
+
+
+
+
+
+ calculates the key id of they key
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Source:
+
openpgp.js, line 3319
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Returns:
+
+
+
+ a 8 byte key id
+
+
+
+
+
+
+
+ Type
+
+
+
+ String
+
+
+
+
+
+
+
+
+
+
+
+
+
<inner> read_nodes
+
+
+
+
+
+
+
+ Continue parsing packets belonging to the key material such as signatures
+
+
+
+
+
+
+
Parameters:
+
+
+
+
+
+
+
Name
+
+
+
Type
+
+
+
+
+
+
Description
+
+
+
+
+
+
+
+
+
parent_node
+
+
+
+
+ openpgp_*
+
+
+
+
+
+
+
+
+
the parent object
+
+
+
+
+
+
+
input
+
+
+
+
+ String
+
+
+
+
+
+
+
+
+
input string to read the packet(s) from
+
+
+
+
+
+
+
position
+
+
+
+
+ integer
+
+
+
+
+
+
+
+
+
start position for the parser
+
+
+
+
+
+
+
len
+
+
+
+
+ integer
+
+
+
+
+
+
+
+
+
length of the packet(s) or remaining length of input
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Source:
+
openpgp.js, line 3211
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Returns:
+
+
+
+ length of nodes read
+
+
+
+
+
+
+
+ Type
+
+
+
+ integer
+
+
+
+
+
+
+
+
+
+
+
+
+
<inner> read_priv_key
+
+
+
+
+
+
+
+ Internal parser for private keys as specified in RFC 4880 section 5.5.3
+
+
+
+
+
+
+
Parameters:
+
+
+
+
+
+
+
Name
+
+
+
Type
+
+
+
+
+
+
Description
+
+
+
+
+
+
+
+
+
input
+
+
+
+
+
+
+
+
+
+
+
input string to read the packet from
+
+
+
+
+
+
+
position
+
+
+
+
+
+
+
+
+
+
+
start position for the parser
+
+
+
+
+
+
+
len
+
+
+
+
+
+
+
+
+
+
+
length of the packet or remaining length of input
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Source:
+
openpgp.js, line 2890
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Returns:
+
+
+
+ this object with attributes set by the parser
+
+
+
+
+
+
+
+
+
+
+
+
+
<inner> read_pub_key
+
+
+
+
+
+
+
+ Internal Parser for public keys as specified in RFC 4880 section 5.5.2 Public-Key Packet Formats
+called by read_tag<num>
+
+
+
+
+
+
+
Parameters:
+
+
+
+
+
+
+
Name
+
+
+
Type
+
+
+
+
+
+
Description
+
+
+
+
+
+
+
+
+
input
+
+
+
+
+
+
+
+
+
+
+
input string to read the packet from
+
+
+
+
+
+
+
position
+
+
+
+
+
+
+
+
+
+
+
start position for the parser
+
+
+
+
+
+
+
len
+
+
+
+
+
+
+
+
+
+
+
length of the packet or remaining length of input
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Source:
+
openpgp.js, line 2780
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Returns:
+
+
+
+ this object with attributes set by the parser
+
+
+
+
+
+
+
+
+
+
+
+
+
<inner> read_tag14
+
+
+
+
+
+
+
+ This function reads the payload of a public key sub packet (Tag 14)
+and initializes the openpgp_packet_keymaterial
+
+
+
+
+
+
+
Parameters:
+
+
+
+
+
+
+
Name
+
+
+
Type
+
+
+
+
+
+
Description
+
+
+
+
+
+
+
+
+
input
+
+
+
+
+
+
+
+
+
+
+
input string to read the packet from
+
+
+
+
+
+
+
position
+
+
+
+
+
+
+
+
+
+
+
start position for the parser
+
+
+
+
+
+
+
len
+
+
+
+
+
+
+
+
+
+
+
length of the packet or remaining length of input
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Source:
+
openpgp.js, line 2763
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Returns:
+
+
+
+ openpgp_packet_keymaterial object
+
+
+
+
+
+
+
+
+
+
+
+
+
<inner> read_tag5
+
+
+
+
+
+
+
+ This function reads the payload of a secret key packet (Tag 5)
+and initializes the openpgp_packet_keymaterial
+
+
+
+
+
+
+
Parameters:
+
+
+
+
+
+
+
Name
+
+
+
Type
+
+
+
+
+
+
Description
+
+
+
+
+
+
+
+
+
input
+
+
+
+
+
+
+
+
+
+
+
input string to read the packet from
+
+
+
+
+
+
+
position
+
+
+
+
+
+
+
+
+
+
+
start position for the parser
+
+
+
+
+
+
+
len
+
+
+
+
+
+
+
+
+
+
+
length of the packet or remaining length of input
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Source:
+
openpgp.js, line 2714
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Returns:
+
+
+
+ openpgp_packet_keymaterial object
+
+
+
+
+
+
+
+
+
+
+
+
+
<inner> read_tag6
+
+
+
+
+
+
+
+ This function reads the payload of a public key packet (Tag 6)
+and initializes the openpgp_packet_keymaterial
+
+
+
+
+
+
+
Parameters:
+
+
+
+
+
+
+
Name
+
+
+
Type
+
+
+
+
+
+
Description
+
+
+
+
+
+
+
+
+
input
+
+
+
+
+
+
+
+
+
+
+
input string to read the packet from
+
+
+
+
+
+
+
position
+
+
+
+
+
+
+
+
+
+
+
start position for the parser
+
+
+
+
+
+
+
len
+
+
+
+
+
+
+
+
+
+
+
length of the packet or remaining length of input
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Source:
+
openpgp.js, line 2729
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Returns:
+
+
+
+ openpgp_packet_keymaterial object
+
+
+
+
+
+
+
+
+
+
+
+
+
<inner> read_tag7
+
+
+
+
+
+
+
+ This function reads the payload of a secret key sub packet (Tag 7)
+and initializes the openpgp_packet_keymaterial
+
+
+
+
+
+
+
Parameters:
+
+
+
+
+
+
+
Name
+
+
+
Type
+
+
+
+
+
+
Description
+
+
+
+
+
+
+
+
+
input
+
+
+
+
+
+
+
+
+
+
+
input string to read the packet from
+
+
+
+
+
+
+
position
+
+
+
+
+
+
+
+
+
+
+
start position for the parser
+
+
+
+
+
+
+
len
+
+
+
+
+
+
+
+
+
+
+
length of the packet or remaining length of input
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Source:
+
openpgp.js, line 2748
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Returns:
+
+
+
+ openpgp_packet_keymaterial object
+
+
+
+
+
+
+
+
+
+
+
+
+
<inner> toString
+
+
+
+
+
+
+
+ Generates Debug output
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Source:
+
openpgp.js, line 3138
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Returns:
+
+
+
+ String which gives some information about the keymaterial
+
+
+
+
+
+
+
+
+
+
+
+
+
<inner> verifyKey
+
+
+
+
+
+
+
+ Checks the validity for usage of this (sub)key
+
Implementation of the Literal Data Packet (Tag 11)
+
+RFC4880 5.9: A Literal Data packet contains the body of a message; data that
+is not to be further interpreted.
+
+
+
+
+
+
+
+
+
+
+
new openpgp_packet_literaldata
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Source:
+
openpgp.js, line 1758
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Methods
+
+
+
+
+
<inner> read_packet
+
+
+
+
+
+
+
+ parsing function for a literal data packet (tag 11).
+
+
+
+
+
+
+
Parameters:
+
+
+
+
+
+
+
Name
+
+
+
Type
+
+
+
+
+
+
Description
+
+
+
+
+
+
+
+
+
input
+
+
+
+
+ string
+
+
+
+
+
+
+
+
+
payload of a tag 11 packet
+
+
+
+
+
+
+
position
+
+
+
+
+ integer
+
+
+
+
+
+
+
+
+
position to start reading from the input string
+
+
+
+
+
+
+
len
+
+
+
+
+ integer
+
+
+
+
+
+
+
+
+
length of the packet or the remaining length of
+ input at position
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Source:
+
openpgp.js, line 1772
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Returns:
+
+
+
+ object representation
+
+
+
+
+
+
+
+ Type
+
+
+
+ openpgp_packet_encrypteddata
+
+
+
+
+
+
+
+
+
+
+
+
+
<inner> toString
+
+
+
+
+
+
+
+ generates debug output (pretty print)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Source:
+
openpgp.js, line 1820
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Returns:
+
+
+
+ String which gives some information about the keymaterial
+
Implementation of the strange "Marker packet" (Tag 10)
+
+RFC4880 5.8: An experimental version of PGP used this packet as the Literal
+packet, but no released version of PGP generated Literal packets with this
+tag. With PGP 5.x, this packet has been reassigned and is reserved for use as
+the Marker packet.
+
+Such a packet MUST be ignored when received.
+
+
+
+
+
+
+
+
+
+
+
new openpgp_packet_marker
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Source:
+
openpgp.js, line 148
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Methods
+
+
+
+
+
<inner> read_packet
+
+
+
+
+
+
+
+ parsing function for a literal data packet (tag 10).
+
+
+
+
+
+
+
Parameters:
+
+
+
+
+
+
+
Name
+
+
+
Type
+
+
+
+
+
+
Description
+
+
+
+
+
+
+
+
+
input
+
+
+
+
+ string
+
+
+
+
+
+
+
+
+
payload of a tag 10 packet
+
+
+
+
+
+
+
position
+
+
+
+
+ integer
+
+
+
+
+
+
+
+
+
position to start reading from the input string
+
+
+
+
+
+
+
len
+
+
+
+
+ integer
+
+
+
+
+
+
+
+
+
length of the packet or the remaining length of
+ input at position
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Source:
+
openpgp.js, line 161
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Returns:
+
+
+
+ object representation
+
+
+
+
+
+
+
+ Type
+
+
+
+ openpgp_packet_encrypteddata
+
+
+
+
+
+
+
+
+
+
+
+
+
<inner> toString
+
+
+
+
+
+
+
+ Generates Debug output
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Source:
+
openpgp.js, line 176
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Returns:
+
+
+
+ String which gives some information about the keymaterial
+
Implementation of the Modification Detection Code Packet (Tag 19)
+
+RFC4880 5.14: The Modification Detection Code packet contains a SHA-1 hash of
+plaintext data, which is used to detect message modification. It is only used
+with a Symmetrically Encrypted Integrity Protected Data packet. The
+Modification Detection Code packet MUST be the last packet in the plaintext
+data that is encrypted in the Symmetrically Encrypted Integrity Protected
+Data packet, and MUST appear in no other place.
+
+
+
+
+
+
+
+
+
+
+
new openpgp_packet_modificationdetectioncode
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Source:
+
openpgp.js, line 1123
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Methods
+
+
+
+
+
<inner> read_packet
+
+
+
+
+
+
+
+ parsing function for a modification detection code packet (tag 19).
+
+
+
+
+
+
+
Parameters:
+
+
+
+
+
+
+
Name
+
+
+
Type
+
+
+
+
+
+
Description
+
+
+
+
+
+
+
+
+
input
+
+
+
+
+ String
+
+
+
+
+
+
+
+
+
payload of a tag 19 packet
+
+
+
+
+
+
+
position
+
+
+
+
+ Integer
+
+
+
+
+
+
+
+
+
position to start reading from the input string
+
+
+
+
+
+
+
len
+
+
+
+
+ Integer
+
+
+
+
+
+
+
+
+
length of the packet or the remaining length of
+ input at position
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Source:
+
openpgp.js, line 1137
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Returns:
+
+
+
+ object representation
+
+
+
+
+
+
+
+ Type
+
+
+
+ openpgp_packet_encrypteddata
+
+
+
+
+
+
+
+
+
+
+
+
+
<inner> toString
+
+
+
+
+
+
+
+ generates debug output (pretty print)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Source:
+
openpgp.js, line 1166
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Returns:
+
+
+
+ String which gives some information about the modification
+ detection code
+
Implementation of the One-Pass Signature Packets (Tag 4)
+
+RFC4880 5.4:
+The One-Pass Signature packet precedes the signed data and contains
+enough information to allow the receiver to begin calculating any
+hashes needed to verify the signature. It allows the Signature
+packet to be placed at the end of the message, so that the signer
+can compute the entire signed message in one pass.
+
+
+
+
+
+
+
+
+
+
+
new openpgp_packet_onepasssignature
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Source:
+
openpgp.js, line 29
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Methods
+
+
+
+
+
<inner> read_packet
+
+
+
+
+
+
+
+ parsing function for a one-pass signature packet (tag 4).
+
+
+
+
+
+
+
Parameters:
+
+
+
+
+
+
+
Name
+
+
+
Type
+
+
+
+
+
+
Description
+
+
+
+
+
+
+
+
+
input
+
+
+
+
+ string
+
+
+
+
+
+
+
+
+
payload of a tag 4 packet
+
+
+
+
+
+
+
position
+
+
+
+
+ integer
+
+
+
+
+
+
+
+
+
position to start reading from the input string
+
+
+
+
+
+
+
len
+
+
+
+
+ integer
+
+
+
+
+
+
+
+
+
length of the packet or the remaining length of input at position
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Source:
+
openpgp.js, line 45
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Returns:
+
+
+
+ object representation
+
+
+
+
+
+
+
+ Type
+
+
+
+ openpgp_packet_encrypteddata
+
+
+
+
+
+
+
+
+
+
+
+
+
<inner> toString
+
+
+
+
+
+
+
+ generates debug output (pretty print)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Source:
+
openpgp.js, line 105
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Returns:
+
+
+
+ String which gives some information about the one-pass signature packet
+
+
+
+
+
+
+
+ Type
+
+
+
+ string
+
+
+
+
+
+
+
+
+
+
+
+
+
<inner> write_packet
+
+
+
+
+
+
+
+ creates a string representation of a one-pass signature packet
+
+
+
+
+
+
+
Parameters:
+
+
+
+
+
+
+
Name
+
+
+
Type
+
+
+
+
+
+
Description
+
+
+
+
+
+
+
+
+
type
+
+
+
+
+ integer
+
+
+
+
+
+
+
+
+
Signature types as described in RFC4880 Section 5.2.1.
boolean showing whether the signature is nested.
+ "true" indicates that the next packet is another One-Pass Signature packet
+ that describes another signature to be applied to the same message data.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Source:
+
openpgp.js, line 84
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Returns:
+
+
+
+ a string representation of a one-pass signature packet
+
Implementation of the Signature Packet (Tag 2)
+
+RFC4480 5.2:
+A Signature packet describes a binding between some public key and
+some data. The most common signatures are a signature of a file or a
+block of text, and a signature that is a certification of a User ID.
+
+
+
+
+
+
+
+
+
+
+
new openpgp_packet_signature
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Source:
+
openpgp.js, line 210
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Methods
+
+
+
+
+
<inner> getIssuer
+
+
+
+
+
+
+
+ gets the issuer key id of this signature
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Source:
+
openpgp.js, line 910
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Returns:
+
+
+
+ issuer key id as string (8bytes)
+
+
+
+
+
+
+
+ Type
+
+
+
+ String
+
+
+
+
+
+
+
+
+
+
+
+
+
<inner> getIssuerKey
+
+
+
+
+
+
+
+ Tries to get the corresponding public key out of the public keyring for the issuer created this signature
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Source:
+
openpgp.js, line 922
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Returns:
+
+
+
+ if found the public key will be returned. null otherwise
+
Implementation of the User Attribute Packet (Tag 17)
+ The User Attribute packet is a variation of the User ID packet. It
+ is capable of storing more types of data than the User ID packet,
+ which is limited to text. Like the User ID packet, a User Attribute
+ packet may be certified by the key owner ("self-signed") or any other
+ key owner who cares to certify it. Except as noted, a User Attribute
+ packet may be used anywhere that a User ID packet may be used.
+
+ While User Attribute packets are not a required part of the OpenPGP
+ standard, implementations SHOULD provide at least enough
+ compatibility to properly handle a certification signature on the
+ User Attribute packet. A simple way to do this is by treating the
+ User Attribute packet as a User ID packet with opaque contents, but
+ an implementation may use any method desired.
+
+
+
+
+
+
+
+
+
+
+
new openpgp_packet_userattribute
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Source:
+
openpgp.js, line 1965
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Methods
+
+
+
+
+
<inner> read_nodes
+
+
+
+
+
+
+
+ Continue parsing packets belonging to the user attribute packet such as signatures
+
+
+
+
+
+
+
Parameters:
+
+
+
+
+
+
+
Name
+
+
+
Type
+
+
+
+
+
+
Description
+
+
+
+
+
+
+
+
+
parent_node
+
+
+
+
+ openpgp_*
+
+
+
+
+
+
+
+
+
the parent object
+
+
+
+
+
+
+
input
+
+
+
+
+ String
+
+
+
+
+
+
+
+
+
input string to read the packet(s) from
+
+
+
+
+
+
+
position
+
+
+
+
+ integer
+
+
+
+
+
+
+
+
+
start position for the parser
+
+
+
+
+
+
+
len
+
+
+
+
+ integer
+
+
+
+
+
+
+
+
+
length of the packet(s) or remaining length of input
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Source:
+
openpgp.js, line 2041
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Returns:
+
+
+
+ length of nodes read
+
+
+
+
+
+
+
+ Type
+
+
+
+ integer
+
+
+
+
+
+
+
+
+
+
+
+
+
<inner> read_packet
+
+
+
+
+
+
+
+ parsing function for a user attribute packet (tag 17).
+
+
+
+
+
+
+
Parameters:
+
+
+
+
+
+
+
Name
+
+
+
Type
+
+
+
+
+
+
Description
+
+
+
+
+
+
+
+
+
input
+
+
+
+
+ string
+
+
+
+
+
+
+
+
+
payload of a tag 17 packet
+
+
+
+
+
+
+
position
+
+
+
+
+ integer
+
+
+
+
+
+
+
+
+
position to start reading from the input string
+
+
+
+
+
+
+
len
+
+
+
+
+ integer
+
+
+
+
+
+
+
+
+
length of the packet or the remaining length of input at position
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Source:
+
openpgp.js, line 1979
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Returns:
+
+
+
+ object representation
+
+
+
+
+
+
+
+ Type
+
+
+
+ openpgp_packet_encrypteddata
+
+
+
+
+
+
+
+
+
+
+
+
+
<inner> toString
+
+
+
+
+
+
+
+ generates debug output (pretty print)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Source:
+
openpgp.js, line 2024
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Returns:
+
+
+
+ String which gives some information about the user attribute packet
+
Implementation of the User ID Packet (Tag 13)
+A User ID packet consists of UTF-8 text that is intended to represent
+the name and email address of the key holder. By convention, it
+includes an RFC 2822 [RFC2822] mail name-addr, but there are no
+restrictions on its content. The packet length in the header
+specifies the length of the User ID.
+
+
+
+
+
+
+
+
+
+
+
new openpgp_packet_userid
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Source:
+
openpgp.js, line 1200
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Methods
+
+
+
+
+
<inner> hasCertificationRevocationSignature
+
+
+
+
+
+
+
+ lookup function to find certification revocation signatures
+
+
+
+
+
+
+
Parameters:
+
+
+
+
+
+
+
Name
+
+
+
Type
+
+
+
+
+
+
Description
+
+
+
+
+
+
+
+
+
keyId
+
+
+
+
+ string
+
+
+
+
+
+
+
+
+
string containing the key id of the issuer of this signature
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Source:
+
openpgp.js, line 1344
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Returns:
+
+
+
+ a CertificationRevocationSignature if found; otherwise null
+
+
+
+
+
+
+
+
+
+
+
+
+
<inner> read_nodes
+
+
+
+
+
+
+
+ Continue parsing packets belonging to the userid packet such as signatures
+
+
+
+
+
+
+
Parameters:
+
+
+
+
+
+
+
Name
+
+
+
Type
+
+
+
+
+
+
Description
+
+
+
+
+
+
+
+
+
parent_node
+
+
+
+
+ openpgp_*
+
+
+
+
+
+
+
+
+
the parent object
+
+
+
+
+
+
+
input
+
+
+
+
+ String
+
+
+
+
+
+
+
+
+
input string to read the packet(s) from
+
+
+
+
+
+
+
position
+
+
+
+
+ integer
+
+
+
+
+
+
+
+
+
start position for the parser
+
+
+
+
+
+
+
len
+
+
+
+
+ integer
+
+
+
+
+
+
+
+
+
length of the packet(s) or remaining length of input
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Source:
+
openpgp.js, line 1244
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Returns:
+
+
+
+ length of nodes read
+
+
+
+
+
+
+
+ Type
+
+
+
+ integer
+
+
+
+
+
+
+
+
+
+
+
+
+
<inner> read_packet
+
+
+
+
+
+
+
+ parsing function for a user id packet (tag 13).
+
+
+
+
+
+
+
Parameters:
+
+
+
+
+
+
+
Name
+
+
+
Type
+
+
+
+
+
+
Description
+
+
+
+
+
+
+
+
+
input
+
+
+
+
+ string
+
+
+
+
+
+
+
+
+
payload of a tag 13 packet
+
+
+
+
+
+
+
position
+
+
+
+
+ integer
+
+
+
+
+
+
+
+
+
position to start reading from the input string
+
+
+
+
+
+
+
len
+
+
+
+
+ integer
+
+
+
+
+
+
+
+
+
length of the packet or the remaining length of input at position
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Source:
+
openpgp.js, line 1214
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Returns:
+
+
+
+ object representation
+
+
+
+
+
+
+
+ Type
+
+
+
+ openpgp_packet_encrypteddata
+
+
+
+
+
+
+
+
+
+
+
+
+
<inner> toString
+
+
+
+
+
+
+
+ generates debug output (pretty print)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Source:
+
openpgp.js, line 1324
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Returns:
+
+
+
+ String which gives some information about the user id packet
+
+
+
+
+
+
+
+ Type
+
+
+
+ string
+
+
+
+
+
+
+
+
+
+
+
+
+
<inner> verify
+
+
+
+
+
+
+
+ verifies the signatures of the user id
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Source:
+
openpgp.js, line 1482
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Returns:
+
+
+
+ 0 if the userid is valid; 1 = userid expired; 2 = userid revoked
+
+
+
+
+
+
+
+
+
+
+
+
+
<inner> verifyCertificationSignatures
+
+
+
+
+
+
+
+ Verifies all certification signatures. This method does not consider possible revocation signatures.
+
+
+
+
+
+
+
Parameters:
+
+
+
+
+
+
+
Name
+
+
+
Type
+
+
+
+
+
+
Description
+
+
+
+
+
+
+
+
+
publicKeyPacket
+
+
+
+
+
+
+
+
+
+
+
the top level key material
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Source:
+
openpgp.js, line 1367
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Returns:
+
+
+
+ an array of integers corresponding to the array of certification signatures. The meaning of each integer is the following:
+0 = bad signature
+1 = signature expired
+2 = issuer key not available
+3 = revoked
+4 = signature valid
+5 = signature by key owner expired
+6 = signature by key owner revoked
+
+
+
+
+
+
+
+
+
+
+
+
+
<inner> write_packet
+
+
+
+
+
+
+
+ creates a string representation of the user id packet
+
Implementation of type key id (RFC4880 3.3)
+ A Key ID is an eight-octet scalar that identifies a key.
+ Implementations SHOULD NOT assume that Key IDs are unique. The
+ section "Enhanced Key Formats" below describes how Key IDs are
+ formed.
+
+
+
+
+
+
+
+
+
+
+
new openpgp_type_keyid
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Source:
+
openpgp.js, line 12495
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Methods
+
+
+
+
+
<inner> read_packet
+
+
+
+
+
+
+
+ parsing method for a key id
+
+
+
+
+
+
+
Parameters:
+
+
+
+
+
+
+
Name
+
+
+
Type
+
+
+
+
+
+
Description
+
+
+
+
+
+
+
+
+
input
+
+
+
+
+ String
+
+
+
+
+
+
+
+
+
input to read the key id from
+
+
+
+
+
+
+
position
+
+
+
+
+ integer
+
+
+
+
+
+
+
+
+
position where to start reading the key id from input
Implementation of the String-to-key specifier (RFC4880 3.7)
+String-to-key (S2K) specifiers are used to convert passphrase strings
+ into symmetric-key encryption/decryption keys. They are used in two
+ places, currently: to encrypt the secret part of private keys in the
+ private keyring, and to convert passphrases to encryption keys for
+ symmetrically encrypted messages.
+
+
+
+
+
+
+
+
+
+
+
new openpgp_type_s2k
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Source:
+
openpgp.js, line 12544
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Methods
+
+
+
+
+
<inner> produce_key
+
+
+
+
+
+
+
+ produces a key using the specified passphrase and the defined hashAlgorithm
+
+
+
+
+
+
+
Parameters:
+
+
+
+
+
+
+
Name
+
+
+
Type
+
+
+
+
+
+
Description
+
+
+
+
+
+
+
+
+
passphrase
+
+
+
+
+
+
+
+
+
+
+
{String} passphrase containing user input
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Source:
+
openpgp.js, line 12614
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Returns:
+
+
+
+ produced key with a length corresponding to hashAlgorithm hash length
+
+
+
+
+
+
+
+ Type
+
+
+
+ String
+
+
+
+
+
+
+
+
+
+
+
+
+
<inner> read
+
+
+
+
+
+
+
+ parsing function for a string-to-key specifier (RFC 4880 3.7).
+
+
+
+
+
+
+
Parameters:
+
+
+
+
+
+
+
Name
+
+
+
Type
+
+
+
+
+
+
Description
+
+
+
+
+
+
+
+
+
input
+
+
+
+
+ string
+
+
+
+
+
+
+
+
+
payload of string-to-key specifier
+
+
+
+
+
+
+
position
+
+
+
+
+ integer
+
+
+
+
+
+
+
+
+
position to start reading from the input string
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Source:
+
openpgp.js, line 12551
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Returns:
+
+
+
+ object representation
+
+
+
+
+
+
+
+ Type
+
+
+
+ openpgp_type_s2k
+
+
+
+
+
+
+
+
+
+
+
+
+
<inner> write
+
+
+
+
+
+
+
+ writes an s2k hash based on the inputs.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Source:
+
openpgp.js, line 12599
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Returns:
+
+
+
+ produced key of hashAlgorithm hash length
+
+
+
+
+
+
+
+ Type
+
+
+
+ String
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/resources/openpgp.js b/resources/openpgp.js
index 77c3ab6e..3b65c0b3 100644
--- a/resources/openpgp.js
+++ b/resources/openpgp.js
@@ -16,7 +16,8 @@
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
/**
- * Implementation of the One-Pass Signature Packets (Tag 4)
+ * @class
+ * @classdesc Implementation of the One-Pass Signature Packets (Tag 4)
*
* RFC4880 5.4:
* The One-Pass Signature packet precedes the signed data and contains
@@ -36,10 +37,10 @@ function openpgp_packet_onepasssignature() {
/**
* parsing function for a one-pass signature packet (tag 4).
- * @param input [string] payload of a tag 4 packet
- * @param position [integer] position to start reading from the input string
- * @param len [integer] length of the packet or the remaining length of input at position
- * @return [openpgp_packet_encrypteddata] object representation
+ * @param {string} input payload of a tag 4 packet
+ * @param {integer} position position to start reading from the input string
+ * @param {integer} len length of the packet or the remaining length of input at position
+ * @return {openpgp_packet_encrypteddata} object representation
*/
function read_packet(input, position, len) {
this.packetLength = len;
@@ -71,14 +72,14 @@ function openpgp_packet_onepasssignature() {
/**
* creates a string representation of a one-pass signature packet
- * @param type [integer] Signature types as described in RFC4880 Section 5.2.1.
- * @param hashalgorithm [integer] the hash algorithm used within the signature
- * @param privatekey [openpgp_msg_privatekey] the private key used to generate the signature
- * @param length [integer] length of data to be signed
- * @param nested [boolean] boolean showing whether the signature is nested.
+ * @param {integer} type Signature types as described in RFC4880 Section 5.2.1.
+ * @param {integer} hashalgorithm the hash algorithm used within the signature
+ * @param {openpgp_msg_privatekey} privatekey the private key used to generate the signature
+ * @param {integer} length length of data to be signed
+ * @param {boolean} nested boolean showing whether the signature is nested.
* "true" indicates that the next packet is another One-Pass Signature packet
* that describes another signature to be applied to the same message data.
- * @return [String] a string representation of a one-pass signature packet
+ * @return {String} a string representation of a one-pass signature packet
*/
function write_packet(type, hashalgorithm, privatekey,length, nested) {
var result ="";
@@ -99,7 +100,7 @@ function openpgp_packet_onepasssignature() {
/**
* generates debug output (pretty print)
- * @return String which gives some information about the one-pass signature packet
+ * @return {string} String which gives some information about the one-pass signature packet
*/
function toString() {
return '5.4. One-Pass Signature Packets (Tag 4)\n'+
@@ -115,7 +116,8 @@ function openpgp_packet_onepasssignature() {
this.read_packet = read_packet;
this.toString = toString;
this.write_packet = write_packet;
-};// GPG4Browsers - An OpenPGP implementation in javascript
+};
+// GPG4Browsers - An OpenPGP implementation in javascript
// Copyright (C) 2011 Recurity Labs GmbH
//
// This library is free software; you can redistribute it and/or
@@ -133,7 +135,8 @@ function openpgp_packet_onepasssignature() {
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
/**
- * Implementation of the strange "Marker packet" (Tag 10)
+ * @class
+ * @classdesc Implementation of the strange "Marker packet" (Tag 10)
*
* RFC4880 5.8: An experimental version of PGP used this packet as the Literal
* packet, but no released version of PGP generated Literal packets with this
@@ -147,14 +150,13 @@ function openpgp_packet_marker() {
/**
* parsing function for a literal data packet (tag 10).
*
- * @param input
- * [string] payload of a tag 10 packet
- * @param position
- * [integer] position to start reading from the input string
- * @param len
- * [integer] length of the packet or the remaining length of
+ * @param {string} input payload of a tag 10 packet
+ * @param {integer} position
+ * position to start reading from the input string
+ * @param {integer} len
+ * length of the packet or the remaining length of
* input at position
- * @return [openpgp_packet_encrypteddata] object representation
+ * @return {openpgp_packet_encrypteddata} object representation
*/
function read_packet(input, position, len) {
this.packetLength = 3;
@@ -169,7 +171,7 @@ function openpgp_packet_marker() {
/**
* Generates Debug output
*
- * @return String which gives some information about the keymaterial
+ * @return {string} String which gives some information about the keymaterial
*/
function toString() {
return "5.8. Marker Packet (Obsolete Literal Packet) (Tag 10)\n"
@@ -178,7 +180,8 @@ function openpgp_packet_marker() {
this.read_packet = read_packet;
this.toString = toString;
-}// GPG4Browsers - An OpenPGP implementation in javascript
+}
+// GPG4Browsers - An OpenPGP implementation in javascript
// Copyright (C) 2011 Recurity Labs GmbH
//
// This library is free software; you can redistribute it and/or
@@ -196,7 +199,8 @@ function openpgp_packet_marker() {
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
/**
- * Implementation of the Signature Packet (Tag 2)
+ * @class
+ * @classdesc Implementation of the Signature Packet (Tag 2)
*
* RFC4480 5.2:
* A Signature packet describes a binding between some public key and
@@ -248,10 +252,10 @@ function openpgp_packet_signature() {
/**
* parsing function for a signature packet (tag 2).
- * @param input [string] payload of a tag 2 packet
- * @param position [integer] position to start reading from the input string
- * @param len [integer] length of the packet or the remaining length of input at position
- * @return [openpgp_packet_encrypteddata] object representation
+ * @param {string} input payload of a tag 2 packet
+ * @param {integer} position position to start reading from the input string
+ * @param {integer} len length of the packet or the remaining length of input at position
+ * @return {openpgp_packet_encrypteddata} object representation
*/
function read_packet(input, position, len) {
this.data = input.substring (position, position+len);
@@ -388,10 +392,10 @@ function openpgp_packet_signature() {
/**
* creates a string representation of a message signature packet (tag 2).
* This can be only used on text data
- * @param signature_type [integer] should be 1 (one)
- * @param data [String] data to be signed
- * @param privatekey [openpgp_msg_privatekey] private key used to sign the message. (secMPIs MUST be unlocked)
- * @return string representation of a signature packet
+ * @param {integer} signature_type should be 1 (one)
+ * @param {String} data data to be signed
+ * @param {openpgp_msg_privatekey} privatekey private key used to sign the message. (secMPIs MUST be unlocked)
+ * @return {string} string representation of a signature packet
*/
function write_message_signature(signature_type, data, privatekey) {
var publickey = privatekey.privateKeyPacket.publicKey;
@@ -434,9 +438,9 @@ function openpgp_packet_signature() {
}
/**
* creates a string representation of a sub signature packet (See RFC 4880 5.2.3.1)
- * @param type [integer] subpacket signature type. Signature types as described in RFC4880 Section 5.2.3.2
- * @param data [String] data to be included
- * @return [String] a string-representation of a sub signature packet (See RFC 4880 5.2.3.1)
+ * @param {integer} type subpacket signature type. Signature types as described in RFC4880 Section 5.2.3.2
+ * @param {String} data data to be included
+ * @return {String} a string-representation of a sub signature packet (See RFC 4880 5.2.3.1)
*/
function write_sub_signature_packet(type, data) {
var result = "";
@@ -842,7 +846,7 @@ function openpgp_packet_signature() {
}
/**
* generates debug output (pretty print)
- * @return String which gives some information about the signature packet
+ * @return {string} String which gives some information about the signature packet
*/
function toString () {
@@ -901,7 +905,7 @@ function openpgp_packet_signature() {
/**
* gets the issuer key id of this signature
- * @return [String] issuer key id as string (8bytes)
+ * @return {String} issuer key id as string (8bytes)
*/
function getIssuer() {
if (this.version == 4)
@@ -951,7 +955,8 @@ function openpgp_packet_signature() {
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
/**
- * Implementation of the Sym. Encrypted Integrity Protected Data Packet (Tag 18)
+ * @class
+ * @classdesc Implementation of the Sym. Encrypted Integrity Protected Data Packet (Tag 18)
*
* RFC4880 5.13: The Symmetrically Encrypted Integrity Protected Data packet is
* a variant of the Symmetrically Encrypted Data packet. It is a new feature
@@ -970,14 +975,12 @@ function openpgp_packet_encryptedintegrityprotecteddata() {
/**
* parsing function for the packet.
*
- * @param input
- * [string] payload of a tag 18 packet
- * @param position
- * [integer] position to start reading from the input string
- * @param len
- * [integer] length of the packet or the remaining length of
+ * @param {string} input payload of a tag 18 packet
+ * @param {integer} position
+ * position to start reading from the input string
+ * @param {integer} len length of the packet or the remaining length of
* input at position
- * @return [openpgp_packet_encryptedintegrityprotecteddata] object
+ * @return {openpgp_packet_encryptedintegrityprotecteddata} object
* representation
*/
function read_packet(input, position, len) {
@@ -1008,11 +1011,9 @@ function openpgp_packet_encryptedintegrityprotecteddata() {
* Creates a string representation of a Sym. Encrypted Integrity Protected
* Data Packet (tag 18) (see RFC4880 5.13)
*
- * @param symmetric_algorithm
- * [integer] the selected symmetric encryption algorithm to be
- * used
- * @param key
- * [String] the key of cipher blocksize length to be used
+ * @param {integer} symmetric_algorithm
+ * the selected symmetric encryption algorithm to be used
+ * @param {String} key the key of cipher blocksize length to be used
* @param data
* plaintext data to be encrypted within the packet
* @return a string representation of the packet
@@ -1045,11 +1046,9 @@ function openpgp_packet_encryptedintegrityprotecteddata() {
* Decrypts the encrypted data contained in this object read_packet must
* have been called before
*
- * @param symmetric_algorithm_type
- * [integer] the selected symmetric encryption algorithm to be
- * used
- * @param key
- * [String] the key of cipher blocksize length to be used
+ * @param {integer} symmetric_algorithm_type
+ * the selected symmetric encryption algorithm to be used
+ * @param {String} key the key of cipher blocksize length to be used
* @return the decrypted data of this packet
*/
function decrypt(symmetric_algorithm_type, key) {
@@ -1110,7 +1109,8 @@ function openpgp_packet_encryptedintegrityprotecteddata() {
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
/**
- * Implementation of the Modification Detection Code Packet (Tag 19)
+ * @class
+ * @classdesc Implementation of the Modification Detection Code Packet (Tag 19)
*
* RFC4880 5.14: The Modification Detection Code packet contains a SHA-1 hash of
* plaintext data, which is used to detect message modification. It is only used
@@ -1126,14 +1126,13 @@ function openpgp_packet_modificationdetectioncode() {
/**
* parsing function for a modification detection code packet (tag 19).
*
- * @param input
- * [String] payload of a tag 19 packet
- * @param position
- * [Integer] position to start reading from the input string
- * @param len
- * [Integer] length of the packet or the remaining length of
+ * @param {String} input payload of a tag 19 packet
+ * @param {Integer} position
+ * position to start reading from the input string
+ * @param {Integer} len
+ * length of the packet or the remaining length of
* input at position
- * @return [openpgp_packet_encrypteddata] object representation
+ * @return {openpgp_packet_encrypteddata} object representation
*/
function read_packet(input, position, len) {
this.packetLength = len;
@@ -1161,7 +1160,7 @@ function openpgp_packet_modificationdetectioncode() {
/**
* generates debug output (pretty print)
*
- * @return String which gives some information about the modification
+ * @return {string} String which gives some information about the modification
* detection code
*/
function toString() {
@@ -1189,6 +1188,8 @@ function openpgp_packet_modificationdetectioncode() {
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
/**
+ * @class
+ * @classdesc Implementation of the User ID Packet (Tag 13)
* A User ID packet consists of UTF-8 text that is intended to represent
* the name and email address of the key holder. By convention, it
* includes an RFC 2822 [RFC2822] mail name-addr, but there are no
@@ -1205,10 +1206,10 @@ function openpgp_packet_userid() {
/**
* parsing function for a user id packet (tag 13).
- * @param input [string] payload of a tag 13 packet
- * @param position [integer] position to start reading from the input string
- * @param len [integer] length of the packet or the remaining length of input at position
- * @return [openpgp_packet_encrypteddata] object representation
+ * @param {string} input payload of a tag 13 packet
+ * @param {integer} position position to start reading from the input string
+ * @param {integer} len length of the packet or the remaining length of input at position
+ * @return {openpgp_packet_encrypteddata} object representation
*/
function read_packet(input, position, len) {
this.text = '';
@@ -1222,8 +1223,8 @@ function openpgp_packet_userid() {
/**
* creates a string representation of the user id packet
- * @param user_id [String] the user id as string ("John Doe > 8) & 0xFF);
@@ -12487,7 +12485,8 @@ function openpgp_type_mpi() {
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
/**
- * Implementation of type key id (RFC4880 3.3)
+ * @class
+ * @classdesc Implementation of type key id (RFC4880 3.3)
* A Key ID is an eight-octet scalar that identifies a key.
Implementations SHOULD NOT assume that Key IDs are unique. The
section "Enhanced Key Formats" below describes how Key IDs are
@@ -12496,8 +12495,8 @@ function openpgp_type_mpi() {
function openpgp_type_keyid() {
/**
* parsing method for a key id
- * @param input [String] input to read the key id from
- * @param position [integer] position where to start reading the key id from input
+ * @param {String} input input to read the key id from
+ * @param {integer} position position where to start reading the key id from input
* @return this object
*/
function read_packet(input, position) {
@@ -12507,7 +12506,7 @@ function openpgp_type_keyid() {
/**
* generates debug output (pretty print)
- * @return [String] Key Id as hexadecimal string
+ * @return {String} Key Id as hexadecimal string
*/
function toString() {
return util.hexstrdump(this.bytes);
@@ -12534,7 +12533,8 @@ function openpgp_type_keyid() {
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
/**
- * Implementation of the String-to-key specifier (RFC4880 3.7)
+ * @class
+ * @classdesc Implementation of the String-to-key specifier (RFC4880 3.7)
* String-to-key (S2K) specifiers are used to convert passphrase strings
into symmetric-key encryption/decryption keys. They are used in two
places, currently: to encrypt the secret part of private keys in the
@@ -12544,9 +12544,9 @@ function openpgp_type_keyid() {
function openpgp_type_s2k() {
/**
* parsing function for a string-to-key specifier (RFC 4880 3.7).
- * @param input [string] payload of string-to-key specifier
- * @param position [integer] position to start reading from the input string
- * @return [openpgp_type_s2k] object representation
+ * @param {string} input payload of string-to-key specifier
+ * @param {integer} position position to start reading from the input string
+ * @return {openpgp_type_s2k} object representation
*/
function read(input, position) {
var mypos = position;
@@ -12594,7 +12594,7 @@ function openpgp_type_s2k() {
/**
* writes an s2k hash based on the inputs.
- * @return [String] produced key of hashAlgorithm hash length
+ * @return {String} produced key of hashAlgorithm hash length
*/
function write(type, hash, passphrase, salt, c){
this.type = type;
@@ -12608,8 +12608,8 @@ function openpgp_type_s2k() {
/**
* produces a key using the specified passphrase and the defined hashAlgorithm
- * @param passphrase [String] passphrase containing user input
- * @return [String] produced key with a length corresponding to hashAlgorithm hash length
+ * @param passphrase {String} passphrase containing user input
+ * @return {String} produced key with a length corresponding to hashAlgorithm hash length
*/
function produce_key(passphrase, numBytes) {
if (this.type == 0) {
diff --git a/resources/openpgp.min.js b/resources/openpgp.min.js
index 4021888a..d0a05306 100644
--- a/resources/openpgp.min.js
+++ b/resources/openpgp.min.js
@@ -391,7 +391,7 @@ return this.len=b-c};this.write=function(){};this.toString=function(){for(var b=
this.subKeys.length;a++)b+=" "+this.subKeys[a].toString();return b};this.validate=function(){for(var b=0;b> 8) & 0xFF);
diff --git a/src/type/openpgp.type.s2k.js b/src/type/openpgp.type.s2k.js
index af1d9fad..959fdaa6 100644
--- a/src/type/openpgp.type.s2k.js
+++ b/src/type/openpgp.type.s2k.js
@@ -16,7 +16,8 @@
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
/**
- * Implementation of the String-to-key specifier (RFC4880 3.7)
+ * @class
+ * @classdesc Implementation of the String-to-key specifier (RFC4880 3.7)
* String-to-key (S2K) specifiers are used to convert passphrase strings
into symmetric-key encryption/decryption keys. They are used in two
places, currently: to encrypt the secret part of private keys in the
@@ -26,9 +27,9 @@
function openpgp_type_s2k() {
/**
* parsing function for a string-to-key specifier (RFC 4880 3.7).
- * @param input [string] payload of string-to-key specifier
- * @param position [integer] position to start reading from the input string
- * @return [openpgp_type_s2k] object representation
+ * @param {string} input payload of string-to-key specifier
+ * @param {integer} position position to start reading from the input string
+ * @return {openpgp_type_s2k} object representation
*/
function read(input, position) {
var mypos = position;
@@ -76,7 +77,7 @@ function openpgp_type_s2k() {
/**
* writes an s2k hash based on the inputs.
- * @return [String] produced key of hashAlgorithm hash length
+ * @return {String} produced key of hashAlgorithm hash length
*/
function write(type, hash, passphrase, salt, c){
this.type = type;
@@ -90,8 +91,8 @@ function openpgp_type_s2k() {
/**
* produces a key using the specified passphrase and the defined hashAlgorithm
- * @param passphrase [String] passphrase containing user input
- * @return [String] produced key with a length corresponding to hashAlgorithm hash length
+ * @param passphrase {String} passphrase containing user input
+ * @return {String} produced key with a length corresponding to hashAlgorithm hash length
*/
function produce_key(passphrase, numBytes) {
if (this.type == 0) {