diff --git a/doc/JXG.Util.html b/doc/JXG.Util.html index cc5783f6..1d882d58 100644 --- a/doc/JXG.Util.html +++ b/doc/JXG.Util.html @@ -30,7 +30,7 @@ Util -
Util class +
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:
-
+
@@ -157,7 +157,7 @@ The code is based on the source code for gunzip.c by Pasi Ojala
Source:
-
+
@@ -232,7 +232,7 @@ EXAMPLES:
Source:
-
+
@@ -291,7 +291,7 @@ EXAMPLES:
Source:
-
+
@@ -396,7 +396,7 @@ EXAMPLES:
Source:
-
+
@@ -454,13 +454,13 @@ EXAMPLES:
diff --git a/doc/_openpgp_packet.html b/doc/_openpgp_packet.html new file mode 100644 index 00000000..ef93ab29 --- /dev/null +++ b/doc/_openpgp_packet.html @@ -0,0 +1,737 @@ + + + + + JSDoc: Class: _openpgp_packet + + + + + + + + + + +
+ +

Class: _openpgp_packet

+ + + + + +
+ +
+

+ _openpgp_packet +

+ +
Parent openpgp packet class. Operations focus on determining packet types + and packet header.
+ +
+ +
+
+ + + + +
+

new _openpgp_packet

+ + +
+
+ + + + + + + + +
+ + + + + + + + + + + + + + + + + +
Source:
+
  • openpgp.js, line 2108
+ + + + + + + +
+ + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + +

Methods

+ +
+ +
+

<inner> encode_length

+ + +
+
+ + +
+ Encodes a given integer of length to the openpgp length specifier to a +string +
+ + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
length + + Integer + + + of the length to encode
+ + + +
+ + + + + + + + + + + + + + + + + +
Source:
+
  • openpgp.js, line 2116
+ + + + + + + +
+ + + + + + + +
Returns:
+ + +
+ string with openpgp length representation +
+ + + + +
+
+ Type +
+
+ + string + +
+
+ + + + +
+ + + +
+

<inner> read_packet

+ + +
+
+ + +
+ Generic static Packet Parser function +
+ + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
input + + String + + + input stream as string
position + + integer + + + position to start parsing
len + + integer + + + length of the input from position on
+ + + +
+ + + + + + + + + + + + + + + + + +
Source:
+
  • openpgp.js, line 2190
+ + + + + + + +
+ + + + + + + +
Returns:
+ + +
+ returns a parsed openpgp_packet +
+ + + + +
+
+ Type +
+
+ + openpgp_packet_* + +
+
+ + + + +
+ + + +
+

<inner> write_old_packet_header

+ + +
+
+ + +
+ Writes a packet header Version 3 with the given tag_type and length to a +string +
+ + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
tag_type + + integer + + + tag type
length + + integer + + + length of the payload
+ + + +
+ + + + + + + + + + + + + + + + + +
Source:
+
  • openpgp.js, line 2162
+ + + + + + + +
+ + + + + + + +
Returns:
+ + +
+ string of the header +
+ + + + +
+
+ Type +
+
+ + string + +
+
+ + + + +
+ + + +
+

<inner> write_packet_header

+ + +
+
+ + +
+ Writes a packet header version 4 with the given tag_type and length to a +string +
+ + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
tag_type + + integer + + + tag type
length + + integer + + + length of the payload
+ + + +
+ + + + + + + + + + + + + + + + + +
Source:
+
  • openpgp.js, line 2146
+ + + + + + + +
+ + + + + + + +
Returns:
+ + +
+ string of the header +
+ + + + +
+
+ Type +
+
+ + string + +
+
+ + + + +
+ +
+ + + + + +
+ +
+ + + + +
+ + + +
+ + + + + + diff --git a/doc/global.html b/doc/global.html index b0921375..b1457442 100644 --- a/doc/global.html +++ b/doc/global.html @@ -126,103 +126,6 @@ - - - - - - - - -
-

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
- - - - - - -
@@ -1239,7 +1142,7 @@ warranty of any kind.
Source:
-
+
@@ -1423,7 +1326,7 @@ blockcipher to decrypt a message
Source:
-
+
@@ -1636,7 +1539,7 @@ using the specified blockcipher to encrypt a message
Source:
-
+
@@ -1802,7 +1705,7 @@ using the specified blockcipher to encrypt a message
Source:
-
+
@@ -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:
-
+
@@ -2185,7 +2021,7 @@ and the specified algorithm.
Source:
-
+
@@ -2255,7 +2091,7 @@ openpgp_type_mpi is returned; otherwise null
Source:
-
+
@@ -2375,7 +2211,7 @@ openpgp_type_mpi is returned; otherwise null
Source:
-
+
@@ -2487,7 +2323,7 @@ openpgp_type_mpi is returned; otherwise null
Source:
-
+
@@ -2599,7 +2435,7 @@ openpgp_type_mpi is returned; otherwise null
Source:
-
+
@@ -2730,7 +2566,7 @@ size of the cipher
Source:
-
+
@@ -2842,7 +2678,7 @@ size of the cipher
Source:
-
+
@@ -2954,7 +2790,7 @@ size of the cipher
Source:
-
+
@@ -3084,7 +2920,7 @@ size of the cipher
Source:
-
+
@@ -3214,7 +3050,7 @@ size of the cipher
Source:
-
+
@@ -3362,7 +3198,7 @@ size of the cipher
Source:
-
+
@@ -3546,7 +3382,7 @@ size of the cipher
Source:
-
+
@@ -3714,7 +3550,7 @@ otherwise use without the resync (for MDC encrypted data)
Source:
-
+
@@ -3902,7 +3738,7 @@ to retrieve that string
Source:
-
+
@@ -4082,7 +3918,7 @@ to retrieve that string
Source:
-
+
@@ -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:
-
+
@@ -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:
-
+
@@ -243,7 +243,7 @@ from the beginning. To use this library call "openpgp.init()"
Source:
-
+
@@ -322,7 +322,7 @@ from the beginning. To use this library call "openpgp.init()"
Source:
-
+
@@ -438,7 +438,7 @@ returns an array of message objects
Source:
-
+
@@ -568,7 +568,7 @@ the private key(s)
Source:
-
+
@@ -698,7 +698,7 @@ the public key(s)
Source:
-
+
@@ -849,7 +849,7 @@ keys to be used to encrypt the message
Source:
-
+
@@ -1021,7 +1021,7 @@ with the specified private key.
Source:
-
+
@@ -1171,7 +1171,7 @@ key to be used to sign the message
Source:
-
+
@@ -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:
-
+
@@ -181,7 +181,7 @@ MDC will be verified as well as message signatures - openpgp_packet_encryptedsessionkey + openpgp_packet_encryptedsessionkey @@ -218,7 +218,7 @@ MDC will be verified as well as message signatures
Source:
-
+
@@ -330,7 +330,7 @@ MDC will be verified as well as message signatures - openpgp_packet_encryptedsessionkey + openpgp_packet_encryptedsessionkey @@ -388,7 +388,7 @@ MDC will be verified as well as message signatures
Source:
-
+
@@ -515,7 +515,7 @@ MDC will be verified as well as message signatures
Source:
-
+
@@ -573,13 +573,13 @@ MDC will be verified as well as message signatures
diff --git a/doc/openpgp_msg_privatekey.html b/doc/openpgp_msg_privatekey.html index 8e62460d..e2e5441a 100644 --- a/doc/openpgp_msg_privatekey.html +++ b/doc/openpgp_msg_privatekey.html @@ -274,13 +274,13 @@
diff --git a/doc/openpgp_msg_publickey.html b/doc/openpgp_msg_publickey.html index 7b2b243b..2c2f38dd 100644 --- a/doc/openpgp_msg_publickey.html +++ b/doc/openpgp_msg_publickey.html @@ -73,7 +73,7 @@
Source:
-
+
@@ -150,7 +150,7 @@
Source:
-
+
@@ -215,7 +215,7 @@
Source:
-
+
@@ -289,7 +289,7 @@
Source:
-
+
@@ -358,7 +358,7 @@
Source:
-
+
@@ -404,13 +404,13 @@
diff --git a/doc/openpgp_packet_compressed.html b/doc/openpgp_packet_compressed.html new file mode 100644 index 00000000..456ff6db --- /dev/null +++ b/doc/openpgp_packet_compressed.html @@ -0,0 +1,771 @@ + + + + + JSDoc: Class: openpgp_packet_compressed + + + + + + + + + + +
+ +

Class: openpgp_packet_compressed

+ + + + + +
+ +
+

+ 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.
+ +
+ +
+
+ + + + +
+

new openpgp_packet_compressed

+ + +
+
+ + + + + + + + +
+ + + + + + + + + + + + + + + + + +
Source:
+
  • openpgp.js, line 2519
+ + + + + + + +
+ + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + +

Methods

+ +
+ +
+

<inner> compress

+ + +
+
+ + +
+ Compress the packet data (member decompressedData) +
+ + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
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:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
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) +
+ + + + + + + +
+ + + + + + + + + + + + + + + + + +
Source:
+
  • openpgp.js, line 2644
+ + + + + + + +
+ + + + + + + +
Returns:
+ + + + + +
+
+ Type +
+
+ + String + +
+
+ + + + +
+ + + +
+

<inner> write_packet

+ + +
+
+ + +
+ creates a string representation of the packet +
+ + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
algorithm + + integer + + + algorithm to be used // See RFC 4880 9.3
data + + String + + + data to be compressed
+ + + +
+ + + + + + + + + + + + + + + + + +
Source:
+
  • openpgp.js, line 2631
+ + + + + + + +
+ + + + + + + +
Returns:
+ + +
+ string-representation of the packet +
+ + + + +
+
+ Type +
+
+ + String + +
+
+ + + + +
+ +
+ + + + + +
+ +
+ + + + +
+ + + +
+ + + + + + diff --git a/doc/openpgp_packet_encrypteddata.html b/doc/openpgp_packet_encrypteddata.html new file mode 100644 index 00000000..93ba2c04 --- /dev/null +++ b/doc/openpgp_packet_encrypteddata.html @@ -0,0 +1,624 @@ + + + + + JSDoc: Class: openpgp_packet_encrypteddata + + + + + + + + + + +
+ +

Class: openpgp_packet_encrypteddata

+ + + + + +
+ +
+

+ 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).
+ +
+ +
+
+ + + + +
+

new openpgp_packet_encrypteddata

+ + +
+
+ + + + + + + + +
+ + + + + + + + + + + + + + + + + +
Source:
+
  • openpgp.js, line 1860
+ + + + + + + +
+ + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + +

Methods

+ +
+ +
+

<inner> decrypt_sym

+ + +
+
+ + +
+ symmetrically decrypt the packet data +
+ + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
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:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
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:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
algo + + Integer + + + symmetric key algorithm to use // See RFC4880 9.2
key + + String + + + key as string with the corresponding length to the + algorithm
data + + String + + + data to be
+ + + +
+ + + + + + + + + + + + + + + + + +
Source:
+
  • openpgp.js, line 1911
+ + + + + + + +
+ + + + + + + +
Returns:
+ + +
+ string-representation of the packet +
+ + + + +
+
+ Type +
+
+ + String + +
+
+ + + + +
+ +
+ + + + + +
+ +
+ + + + +
+ + + +
+ + + + + + diff --git a/doc/openpgp_packet_encryptedintegrityprotecteddata.html b/doc/openpgp_packet_encryptedintegrityprotecteddata.html new file mode 100644 index 00000000..7fc78d6e --- /dev/null +++ b/doc/openpgp_packet_encryptedintegrityprotecteddata.html @@ -0,0 +1,610 @@ + + + + + JSDoc: Class: openpgp_packet_encryptedintegrityprotecteddata + + + + + + + + + + +
+ +

Class: openpgp_packet_encryptedintegrityprotecteddata

+ + + + + +
+ +
+

+ 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.
+ +
+ +
+
+ + + + +
+

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:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
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:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
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
+ + + +
+ + + + + + + + + + + + + + + + + +
Source:
+
  • openpgp.js, line 986
+ + + + + + + +
+ + + + + + + +
Returns:
+ + +
+ object + representation +
+ + + + +
+
+ Type +
+
+ + openpgp_packet_encryptedintegrityprotecteddata + +
+
+ + + + +
+ + + +
+

<inner> write_packet

+ + +
+
+ + +
+ Creates a string representation of a Sym. Encrypted Integrity Protected +Data Packet (tag 18) (see RFC4880 5.13) +
+ + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
symmetric_algorithm + + integer + + + the selected symmetric encryption algorithm to be used
key + + String + + + the key of cipher blocksize length to be used
data + + plaintext data to be encrypted within the packet
+ + + +
+ + + + + + + + + + + + + + + + + +
Source:
+
  • openpgp.js, line 1021
+ + + + + + + +
+ + + + + + + +
Returns:
+ + +
+ a string representation of the packet +
+ + + + + + +
+ +
+ + + + + +
+ +
+ + + + +
+ + + +
+ + + + + + diff --git a/doc/openpgp_packet_encryptedsessionkey.html b/doc/openpgp_packet_encryptedsessionkey.html new file mode 100644 index 00000000..37923a22 --- /dev/null +++ b/doc/openpgp_packet_encryptedsessionkey.html @@ -0,0 +1,925 @@ + + + + + JSDoc: Class: openpgp_packet_encryptedsessionkey + + + + + + + + + + +
+ +

Class: openpgp_packet_encryptedsessionkey

+ + + + + +
+ +
+

+ 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.
+ +
+ +
+
+ + + + +
+

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) +
+ + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
msg + + openpgp_msg_message + + + the message object (with member encryptedData
key + + openpgp_msg_privatekey + + + private key with secMPIs unlocked
+ + + +
+ + + + + + + + + + + + + + + + + +
Source:
+
  • openpgp.js, line 1673
+ + + + + + + +
+ + + + + + + +
Returns:
+ + +
+ the unencrypted session key +
+ + + + +
+
+ Type +
+
+ + String + +
+
+ + + + +
+ + + +
+

<inner> read_pub_key_packet

+ + +
+
+ + +
+ parsing function for a publickey encrypted session key packet (tag 1). +
+ + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
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:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
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:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
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
+ + + +
+ + + + + + + + + + + + + + + + + +
Source:
+
  • openpgp.js, line 1610
+ + + + + + + +
+ + + + + + + +
Returns:
+ + +
+ the string representation +
+ + + + +
+
+ Type +
+
+ + String + +
+
+ + + + +
+ +
+ + + + + +
+ +
+ + + + +
+ + + +
+ + + + + + diff --git a/doc/openpgp_packet_keymaterial.html b/doc/openpgp_packet_keymaterial.html new file mode 100644 index 00000000..c64e2485 --- /dev/null +++ b/doc/openpgp_packet_keymaterial.html @@ -0,0 +1,1643 @@ + + + + + JSDoc: Class: openpgp_packet_keymaterial + + + + + + + + + + +
+ +

Class: openpgp_packet_keymaterial

+ + + + + +
+ +
+

+ 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.
+ +
+ +
+
+ + + + +
+

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:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
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:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
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:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
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:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
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:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
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:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
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:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
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:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
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 +
+ + + + + + + +
+ + + + + + + + + + + + + + + + + +
Source:
+
  • openpgp.js, line 3288
+ + + + + + + +
+ + + + + + + +
Returns:
+ + +
+ 0 = bad key, 1 = expired, 2 = revoked, 3 = valid +
+ + + + + + +
+ +
+ + + + + +
+ +
+ + + + +
+ + + +
+ + + + + + diff --git a/doc/openpgp_packet_literaldata.html b/doc/openpgp_packet_literaldata.html new file mode 100644 index 00000000..2ad78e2f --- /dev/null +++ b/doc/openpgp_packet_literaldata.html @@ -0,0 +1,522 @@ + + + + + JSDoc: Class: openpgp_packet_literaldata + + + + + + + + + + +
+ +

Class: openpgp_packet_literaldata

+ + + + + +
+ +
+

+ 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.
+ +
+ +
+
+ + + + +
+

new openpgp_packet_literaldata

+ + +
+
+ + + + + + + + +
+ + + + + + + + + + + + + + + + + +
Source:
+
  • openpgp.js, line 1758
+ + + + + + + +
+ + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + +

Methods

+ +
+ +
+

<inner> read_packet

+ + +
+
+ + +
+ parsing function for a literal data packet (tag 11). +
+ + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
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 +
+ + + + +
+
+ Type +
+
+ + string + +
+
+ + + + +
+ + + +
+

<inner> write_packet

+ + +
+
+ + +
+ Creates a string representation of the packet +
+ + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
data + + String + + + the data to be inserted as body
+ + + +
+ + + + + + + + + + + + + + + + + +
Source:
+
  • openpgp.js, line 1792
+ + + + + + + +
+ + + + + + + +
Returns:
+ + +
+ string-representation of the packet +
+ + + + +
+
+ Type +
+
+ + String + +
+
+ + + + +
+ +
+ + + + + +
+ +
+ + + + +
+ + + +
+ + + + + + diff --git a/doc/openpgp_packet_marker.html b/doc/openpgp_packet_marker.html new file mode 100644 index 00000000..5e615422 --- /dev/null +++ b/doc/openpgp_packet_marker.html @@ -0,0 +1,399 @@ + + + + + JSDoc: Class: openpgp_packet_marker + + + + + + + + + + +
+ +

Class: openpgp_packet_marker

+ + + + + +
+ +
+

+ 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.
+ +
+ +
+
+ + + + +
+

new openpgp_packet_marker

+ + +
+
+ + + + + + + + +
+ + + + + + + + + + + + + + + + + +
Source:
+
  • openpgp.js, line 148
+ + + + + + + +
+ + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + +

Methods

+ +
+ +
+

<inner> read_packet

+ + +
+
+ + +
+ parsing function for a literal data packet (tag 10). +
+ + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
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 +
+ + + + +
+
+ Type +
+
+ + string + +
+
+ + + + +
+ +
+ + + + + +
+ +
+ + + + +
+ + + +
+ + + + + + diff --git a/doc/openpgp_packet_modificationdetectioncode.html b/doc/openpgp_packet_modificationdetectioncode.html new file mode 100644 index 00000000..2f23b379 --- /dev/null +++ b/doc/openpgp_packet_modificationdetectioncode.html @@ -0,0 +1,400 @@ + + + + + JSDoc: Class: openpgp_packet_modificationdetectioncode + + + + + + + + + + +
+ +

Class: openpgp_packet_modificationdetectioncode

+ + + + + +
+ +
+

+ 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.
+ +
+ +
+
+ + + + +
+

new openpgp_packet_modificationdetectioncode

+ + +
+
+ + + + + + + + +
+ + + + + + + + + + + + + + + + + +
Source:
+
  • openpgp.js, line 1123
+ + + + + + + +
+ + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + +

Methods

+ +
+ +
+

<inner> read_packet

+ + +
+
+ + +
+ parsing function for a modification detection code packet (tag 19). +
+ + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
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 +
+ + + + +
+
+ Type +
+
+ + string + +
+
+ + + + +
+ +
+ + + + + +
+ +
+ + + + +
+ + + +
+ + + + + + diff --git a/doc/openpgp_packet_onepasssignature.html b/doc/openpgp_packet_onepasssignature.html new file mode 100644 index 00000000..e962a9c3 --- /dev/null +++ b/doc/openpgp_packet_onepasssignature.html @@ -0,0 +1,611 @@ + + + + + JSDoc: Class: openpgp_packet_onepasssignature + + + + + + + + + + +
+ +

Class: openpgp_packet_onepasssignature

+ + + + + +
+ +
+

+ 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.
+ +
+ +
+
+ + + + +
+

new openpgp_packet_onepasssignature

+ + +
+
+ + + + + + + + +
+ + + + + + + + + + + + + + + + + +
Source:
+
  • openpgp.js, line 29
+ + + + + + + +
+ + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + +

Methods

+ +
+ +
+

<inner> read_packet

+ + +
+
+ + +
+ parsing function for a one-pass signature packet (tag 4). +
+ + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
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:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
type + + integer + + + Signature types as described in RFC4880 Section 5.2.1.
hashalgorithm + + integer + + + the hash algorithm used within the signature
privatekey + + openpgp_msg_privatekey + + + the private key used to generate the signature
length + + integer + + + length of data to be signed
nested + + boolean + + + 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 +
+ + + + +
+
+ Type +
+
+ + String + +
+
+ + + + +
+ +
+ + + + + +
+ +
+ + + + +
+ + + +
+ + + + + + diff --git a/doc/openpgp_packet_signature.html b/doc/openpgp_packet_signature.html new file mode 100644 index 00000000..ead5abf2 --- /dev/null +++ b/doc/openpgp_packet_signature.html @@ -0,0 +1,1024 @@ + + + + + JSDoc: Class: openpgp_packet_signature + + + + + + + + + + +
+ +

Class: openpgp_packet_signature

+ + + + + +
+ +
+

+ 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.
+ +
+ +
+
+ + + + +
+

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 +
+ + + + +
+
+ Type +
+
+ + obj: [openpgp_msg_publickey], text: [String] + +
+
+ + + + +
+ + + +
+

<inner> read_packet

+ + +
+
+ + +
+ parsing function for a signature packet (tag 2). +
+ + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
input + + string + + + payload of a tag 2 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 260
+ + + + + + + +
+ + + + + + + +
Returns:
+ + +
+ object representation +
+ + + + +
+
+ Type +
+
+ + openpgp_packet_encrypteddata + +
+
+ + + + +
+ + + +
+

<inner> toString

+ + +
+
+ + +
+ generates debug output (pretty print) +
+ + + + + + + +
+ + + + + + + + + + + + + + + + + +
Source:
+
  • openpgp.js, line 852
+ + + + + + + +
+ + + + + + + +
Returns:
+ + +
+ String which gives some information about the signature packet +
+ + + + +
+
+ Type +
+
+ + string + +
+
+ + + + +
+ + + +
+

<inner> verify

+ + +
+
+ + +
+ verifys the signature packet. Note: not signature types are implemented +
+ + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
data + + String + + + data which on the signature applies
key + + openpgp_msg_privatekey + + + the public key to verify the signature
+ + + +
+ + + + + + + + + + + + + + + + + +
Source:
+
  • openpgp.js, line 668
+ + + + + + + +
+ + + + + + + +
Returns:
+ + +
+ True if message is verified, else false. +
+ + + + +
+
+ Type +
+
+ + boolean + +
+
+ + + + +
+ + + +
+

<inner> write_message_signature

+ + +
+
+ + +
+ creates a string representation of a message signature packet (tag 2). +This can be only used on text data +
+ + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
signature_type + + integer + + + should be 1 (one)
data + + String + + + data to be signed
privatekey + + openpgp_msg_privatekey + + + private key used to sign the message. (secMPIs MUST be unlocked)
+ + + +
+ + + + + + + + + + + + + + + + + +
Source:
+
  • openpgp.js, line 400
+ + + + + + + +
+ + + + + + + +
Returns:
+ + +
+ string representation of a signature packet +
+ + + + +
+
+ Type +
+
+ + string + +
+
+ + + + +
+ + + +
+

<inner> write_sub_signature_packet

+ + +
+
+ + +
+ creates a string representation of a sub signature packet (See RFC 4880 5.2.3.1) +
+ + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
type + + integer + + + subpacket signature type. Signature types as described in RFC4880 Section 5.2.3.2
data + + String + + + data to be included
+ + + +
+ + + + + + + + + + + + + + + + + +
Source:
+
  • openpgp.js, line 445
+ + + + + + + +
+ + + + + + + +
Returns:
+ + +
+ a string-representation of a sub signature packet (See RFC 4880 5.2.3.1) +
+ + + + +
+
+ Type +
+
+ + String + +
+
+ + + + +
+ +
+ + + + + +
+ +
+ + + + +
+ + + +
+ + + + + + diff --git a/doc/openpgp_packet_userattribute.html b/doc/openpgp_packet_userattribute.html new file mode 100644 index 00000000..49e583de --- /dev/null +++ b/doc/openpgp_packet_userattribute.html @@ -0,0 +1,594 @@ + + + + + JSDoc: Class: openpgp_packet_userattribute + + + + + + + + + + +
+ +

Class: openpgp_packet_userattribute

+ + + + + +
+ +
+

+ openpgp_packet_userattribute +

+ +
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:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
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:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
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 +
+ + + + +
+
+ Type +
+
+ + string + +
+
+ + + + +
+ +
+ + + + + +
+ +
+ + + + +
+ + + +
+ + + + + + diff --git a/doc/openpgp_packet_userid.html b/doc/openpgp_packet_userid.html new file mode 100644 index 00000000..74057b4b --- /dev/null +++ b/doc/openpgp_packet_userid.html @@ -0,0 +1,1016 @@ + + + + + JSDoc: Class: openpgp_packet_userid + + + + + + + + + + +
+ +

Class: openpgp_packet_userid

+ + + + + +
+ +
+

+ openpgp_packet_userid +

+ +
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:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
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:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
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:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
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:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
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 +
+ + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
user_id + + String + + + the user id as string ("John Doe +
+ + + +
+ + + + + + + + + + + + + + + + + +
Source:
+
  • openpgp.js, line 1229
+ + + + + + + +
+ + + + + + + +
Returns:
+ + +
+ string representation +
+ + + + +
+
+ Type +
+
+ + String + +
+
+ + + + +
+ +
+ + + + + +
+ +
+ + + + +
+ + + +
+ + + + + + diff --git a/doc/openpgp_type_keyid.html b/doc/openpgp_type_keyid.html new file mode 100644 index 00000000..5c3f5061 --- /dev/null +++ b/doc/openpgp_type_keyid.html @@ -0,0 +1,362 @@ + + + + + JSDoc: Class: openpgp_type_keyid + + + + + + + + + + +
+ +

Class: openpgp_type_keyid

+ + + + + +
+ +
+

+ 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.
+ +
+ +
+
+ + + + +
+

new openpgp_type_keyid

+ + +
+
+ + + + + + + + +
+ + + + + + + + + + + + + + + + + +
Source:
+
  • openpgp.js, line 12495
+ + + + + + + +
+ + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + +

Methods

+ +
+ +
+

<inner> read_packet

+ + +
+
+ + +
+ parsing method for a key id +
+ + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
input + + String + + + input to read the key id from
position + + integer + + + position where to start reading the key id from input
+ + + +
+ + + + + + + + + + + + + + + + + +
Source:
+
  • openpgp.js, line 12502
+ + + + + + + +
+ + + + + + + +
Returns:
+ + +
+ this object +
+ + + + + + +
+ + + +
+

<inner> toString

+ + +
+
+ + +
+ generates debug output (pretty print) +
+ + + + + + + +
+ + + + + + + + + + + + + + + + + +
Source:
+
  • openpgp.js, line 12511
+ + + + + + + +
+ + + + + + + +
Returns:
+ + +
+ Key Id as hexadecimal string +
+ + + + +
+
+ Type +
+
+ + String + +
+
+ + + + +
+ +
+ + + + + +
+ +
+ + + + +
+ + + +
+ + + + + + diff --git a/doc/openpgp_type_mpi.html b/doc/openpgp_type_mpi.html new file mode 100644 index 00000000..8fe53dbe --- /dev/null +++ b/doc/openpgp_type_mpi.html @@ -0,0 +1,751 @@ + + + + + JSDoc: Class: openpgp_type_mpi + + + + + + + + + + +
+ +

Class: openpgp_type_mpi

+ + + + + +
+ +
+

+ openpgp_type_mpi +

+ +
+ +
+
+ + + + +
+

new openpgp_type_mpi

+ + +
+
+ + + + + + + + +
+ + + + + + + + + + + + + + + + + +
Source:
+
  • openpgp.js, line 12369
+ + + + + + + +
+ + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + +

Methods

+ +
+ +
+

<inner> create

+ + +
+
+ + +
+ creates an mpi from the specified string +
+ + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
data + + String + + + data to read the mpi from
+ + + +
+ + + + + + + + + + + + + + + + + +
Source:
+
  • openpgp.js, line 12444
+ + + + + + + +
+ + + + + + + +
Returns:
+ + + + + +
+
+ Type +
+
+ + openpgp_type_mpi + +
+
+ + + + +
+ + + +
+

<inner> getBigInteger

+ + +
+
+ + +
+ converts the mpi to an BigInteger object +
+ + + + + + + +
+ + + + + + + + + + + + + + + + + +
Source:
+
  • openpgp.js, line 12420
+ + + + + + + +
+ + + + + + + +
Returns:
+ + + + + +
+
+ Type +
+
+ + BigInteger + +
+
+ + + + +
+ + + +
+

<inner> getByteLength

+ + +
+
+ + +
+ gets the length of the mpi in bytes +
+ + + + + + + +
+ + + + + + + + + + + + + + + + + +
Source:
+
  • openpgp.js, line 12435
+ + + + + + + +
+ + + + + + + +
Returns:
+ + +
+ mpi byte length +
+ + + + +
+
+ Type +
+
+ + integer + +
+
+ + + + +
+ + + +
+

<inner> read

+ + +
+
+ + +
+ parsing function for a mpi (RFC 4880 3.2). +
+ + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
input + + string + + + payload of mpi data
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 12381
+ + + + + + + +
+ + + + + + + +
Returns:
+ + +
+ object representation +
+ + + + +
+
+ Type +
+
+ + openpgp_type_mpi + +
+
+ + + + +
+ + + +
+

<inner> toBin

+ + +
+
+ + +
+ converts the mpi object to a string as specified in RFC4880 3.2 +
+ + + + + + + +
+ + + + + + + + + + + + + + + + + +
Source:
+
  • openpgp.js, line 12455
+ + + + + + + +
+ + + + + + + +
Returns:
+ + +
+ mpi byte representation +
+ + + + +
+
+ Type +
+
+ + String + +
+
+ + + + +
+ + + +
+

<inner> toString

+ + +
+
+ + +
+ generates debug output (pretty print) +
+ + + + + + + +
+ + + + + + + + + + + + + + + + + +
Source:
+
  • openpgp.js, line 12410
+ + + + + + + +
+ + + + + + + +
Returns:
+ + +
+ String which gives some information about the mpi +
+ + + + +
+
+ Type +
+
+ + string + +
+
+ + + + +
+ +
+ + + + + +
+ +
+ + + + +
+ + + +
+ + + + + + diff --git a/doc/openpgp_type_s2k.html b/doc/openpgp_type_s2k.html new file mode 100644 index 00000000..51ff8b47 --- /dev/null +++ b/doc/openpgp_type_s2k.html @@ -0,0 +1,499 @@ + + + + + JSDoc: Class: openpgp_type_s2k + + + + + + + + + + +
+ +

Class: openpgp_type_s2k

+ + + + + +
+ +
+

+ 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.
+ +
+ +
+
+ + + + +
+

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:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
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:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
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) {