fork-openpgpjs/doc/global.html

7383 lines
98 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>JSDoc: Global</title>
<script src="http://shjs.sourceforge.net/sh_main.min.js"> </script>
<script src="http://shjs.sourceforge.net/lang/sh_javascript.min.js"> </script>
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<link type="text/css" rel="stylesheet" href="styles/node-dark.css">
<link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
</head>
<body>
<div id="main">
<h1 class="page-title">Global</h1>
<section>
<header>
<h2>
</h2>
</header>
<article>
<div class="container-overview">
<dl class="details">
</dl>
</div>
<h3 class="subsection-title">Members</h3>
<dl>
<dt>
<h4 class="name" id="crc_table"><span class="type-signature"></span>crc_table<span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
Internal function to calculate a CRC-24 checksum over a given string (data)
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>openpgp.js, line 10861</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="debug"><span class="type-signature"></span>debug<span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
if enabled, debug messages will be printed
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>openpgp.js, line 10283</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="default_config"><span class="type-signature"></span>default_config<span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
the default config object which is used if no
configuration was in place
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>openpgp.js, line 10251</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="hash_headers"><span class="type-signature"></span>hash_headers<span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
ASN1 object identifiers for hashes (See RFC4880 5.2.2)
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>openpgp.js, line 10527</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="util"><span class="type-signature"></span>util<span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
an instance that should be used.
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>openpgp.js, line 15272</li></ul></dd>
</dl>
</dd>
</dl>
<h3 class="subsection-title">Methods</h3>
<dl>
<dt>
<h4 class="name" id="bin2str"><span class="type-signature"></span>bin2str</h4>
</dt>
<dd>
<div class="description">
convert an array of integers(0.255) to a string
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>[Array</code></td>
<td class="type">
</td>
<td class="description last">[Integer 0..255]] array of (binary) integers to convert</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>openpgp.js, line 15102</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
[String] string representation of the array
</div>
</dd>
<dt>
<h4 class="name" id="calc_checksum"><span class="type-signature"></span>calc_checksum</h4>
</dt>
<dd>
<div class="description">
calculates a 16bit sum of a string by adding each character codes modulus 65535
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>text</code></td>
<td class="type">
</td>
<td class="description last">[String] string to create a sum of</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>openpgp.js, line 15141</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
[Integer] an integer containing the sum of all character codes % 65535
</div>
</dd>
<dt>
<h4 class="name" id="get_hashAlgorithmString"><span class="type-signature"></span>get_hashAlgorithmString</h4>
</dt>
<dd>
<div class="description">
Return the algorithm type as string
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>openpgp.js, line 15248</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
[String] String representing the message type
</div>
</dd>
<dt>
<h4 class="name" id="getCheckSum"><span class="type-signature"></span>getCheckSum</h4>
</dt>
<dd>
<div class="description">
Calculates a checksum over the given data and returns it base64 encoded
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>data</code></td>
<td class="type">
</td>
<td class="description last">[String] data to create a CRC-24 checksum for</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>openpgp.js, line 10837</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
[String] base64 encoded checksum
</div>
</dd>
<dt>
<h4 class="name" id="getPGPMessageType"><span class="type-signature"></span>getPGPMessageType</h4>
</dt>
<dd>
<div class="description">
Finds out which Ascii Armoring type is used. This is an internal function
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>text</code></td>
<td class="type">
</td>
<td class="description last">[String] ascii armored text</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>openpgp.js, line 10710</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
0 = MESSAGE PART n of m
1 = MESSAGE PART n
2 = SIGNED MESSAGE
3 = PGP MESSAGE
4 = PUBLIC KEY BLOCK
5 = PRIVATE KEY BLOCK
null = unknown
</div>
</dd>
<dt>
<h4 class="name" id="hex2bin"><span class="type-signature"></span>hex2bin</h4>
</dt>
<dd>
<div class="description">
create binary string from a hex encoded string
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>str</code></td>
<td class="type">
</td>
<td class="description last">[String] hex string to convert</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>openpgp.js, line 15058</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
[String] string containing the binary values
</div>
</dd>
<dt>
<h4 class="name" id="hexidump"><span class="type-signature"></span>hexidump</h4>
</dt>
<dd>
<div class="description">
creating a hex string from an binary array of integers (0..255)
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>[Array[integer</code></td>
<td class="type">
</td>
<td class="description last">0..255]] array to convert</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>openpgp.js, line 15070</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
[String] hexadecimal representation of the array
</div>
</dd>
<dt>
<h4 class="name" id="hexstrdump"><span class="type-signature"></span>hexstrdump</h4>
</dt>
<dd>
<div class="description">
create hexstring from a binary
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>str</code></td>
<td class="type">
</td>
<td class="description last">[String] string to convert</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>openpgp.js, line 15038</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
[String] string containing the hexadecimal values
</div>
</dd>
<dt>
<h4 class="name" id="MD5"><span class="type-signature"></span>MD5</h4>
</dt>
<dd>
<div class="description">
A fast MD5 JavaScript implementation
Copyright (c) 2012 Joseph Myers
http://www.myersdaily.org/joseph/javascript/md5-text.html
Permission to use, copy, modify, and distribute this software
and its documentation for any purposes and without
fee is hereby granted provided that this copyright notice
appears in all copies.
Of course, this soft is provided "as is" without express or implied
warranty of any kind.
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>openpgp.js, line 3485</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="openpgp_cfb_decrypt"><span class="type-signature"></span>openpgp_cfb_decrypt</h4>
</dt>
<dd>
<div class="description">
This function decrypts a given plaintext using the specified
blockcipher to decrypt a message
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>blockcipherfn</code></td>
<td class="type">
</td>
<td class="description last">the algorithm _encrypt_ function to encrypt
data in one block_size encryption. The function must be
specified as blockcipherfn([integer_array(integers 0..255)]
block,[integer_array(integers 0..255)] key) returning an
array of bytes (integers 0..255)</td>
</tr>
<tr>
<td class="name"><code>block_size</code></td>
<td class="type">
</td>
<td class="description last">the block size in bytes of the algorithm used</td>
</tr>
<tr>
<td class="name"><code>plaintext</code></td>
<td class="type">
</td>
<td class="description last">ciphertext to be decrypted provided as a string</td>
</tr>
<tr>
<td class="name"><code>key</code></td>
<td class="type">
</td>
<td class="description last">key to be used to decrypt the ciphertext as
integer_array(integers 0..255)]. This will be passed to the
blockcipherfn</td>
</tr>
<tr>
<td class="name"><code>resync</code></td>
<td class="type">
</td>
<td class="description last">a boolean value specifying if a resync of the
IV should be used or not. The encrypteddatapacket uses the
"old" style with a resync. Decryption within an
encryptedintegrityprotecteddata packet is not resyncing the IV.</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>openpgp.js, line 9027</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
a string with the plaintext data
</div>
</dd>
<dt>
<h4 class="name" id="openpgp_cfb_encrypt"><span class="type-signature"></span>openpgp_cfb_encrypt</h4>
</dt>
<dd>
<div class="description">
This function encrypts a given with the specified prefixrandom
using the specified blockcipher to encrypt a message
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>prefixrandom</code></td>
<td class="type">
</td>
<td class="description last">random bytes of block_size length provided
as a string to be used in prefixing the data</td>
</tr>
<tr>
<td class="name"><code>blockcipherfn</code></td>
<td class="type">
</td>
<td class="description last">the algorithm encrypt function to encrypt
data in one block_size encryption. The function must be
specified as blockcipherfn([integer_array(integers 0..255)]
block,[integer_array(integers 0..255)] key) returning an
array of bytes (integers 0..255)</td>
</tr>
<tr>
<td class="name"><code>block_size</code></td>
<td class="type">
</td>
<td class="description last">the block size in bytes of the algorithm used</td>
</tr>
<tr>
<td class="name"><code>plaintext</code></td>
<td class="type">
</td>
<td class="description last">data to be encrypted provided as a string</td>
</tr>
<tr>
<td class="name"><code>key</code></td>
<td class="type">
</td>
<td class="description last">key to be used to encrypt the data as
integer_array(integers 0..255)]. This will be passed to the
blockcipherfn</td>
</tr>
<tr>
<td class="name"><code>resync</code></td>
<td class="type">
</td>
<td class="description last">a boolean value specifying if a resync of the
IV should be used or not. The encrypteddatapacket uses the
"old" style with a resync. Encryption within an
encryptedintegrityprotecteddata packet is not resyncing the IV.</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>openpgp.js, line 8890</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
a string with the encrypted data
</div>
</dd>
<dt>
<h4 class="name" id="openpgp_cfb_mdc"><span class="type-signature"></span>openpgp_cfb_mdc</h4>
</dt>
<dd>
<div class="description">
decrypts the prefixed data for the Modification Detection Code (MDC) computation
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>blockcipherencryptfn</code></td>
<td class="type">
</td>
<td class="description last">cipher function to use</td>
</tr>
<tr>
<td class="name"><code>block_size</code></td>
<td class="type">
</td>
<td class="description last">blocksize of the algorithm</td>
</tr>
<tr>
<td class="name"><code>key</code></td>
<td class="type">
</td>
<td class="description last">the key for encryption</td>
</tr>
<tr>
<td class="name"><code>ciphertext</code></td>
<td class="type">
</td>
<td class="description last">the encrypted data</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>openpgp.js, line 8986</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
plaintext data of D(ciphertext) with blocksize length +2
</div>
</dd>
<dt>
<h4 class="name" id="openpgp_config"><span class="type-signature"></span>openpgp_config</h4>
</dt>
<dd>
<div class="description">
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
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>openpgp.js, line 10244</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="openpgp_crypto_asymetricDecrypt"><span class="type-signature"></span>openpgp_crypto_asymetricDecrypt</h4>
</dt>
<dd>
<div class="description">
Decrypts data using the specified public key multiprecision integers of the private key,
the specified secretMPIs of the private key and the specified algorithm.
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>algo</code></td>
<td class="type">
</td>
<td class="description last">[Integer] Algorithm to be used (See RFC4880 9.1)</td>
</tr>
<tr>
<td class="name"><code>publicMPIs</code></td>
<td class="type">
</td>
<td class="description last">[Array[openpgp_type_mpi]] algorithm dependent multiprecision integers of the public key part of the private key</td>
</tr>
<tr>
<td class="name"><code>secretMPIs</code></td>
<td class="type">
</td>
<td class="description last">[Array[openpgp_type_mpi]] algorithm dependent multiprecision integers of the private key used</td>
</tr>
<tr>
<td class="name"><code>data</code></td>
<td class="type">
</td>
<td class="description last">[openpgp_type_mpi] data to be encrypted as MPI</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>openpgp.js, line 9195</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
[BigInteger] returns a big integer containing the decrypted data; otherwise null
</div>
</dd>
<dt>
<h4 class="name" id="openpgp_crypto_asymetricEncrypt"><span class="type-signature"></span>openpgp_crypto_asymetricEncrypt</h4>
</dt>
<dd>
<div class="description">
Encrypts data using the specified public key multiprecision integers
and the specified algorithm.
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>algo</code></td>
<td class="type">
</td>
<td class="description last">[Integer] Algorithm to be used (See RFC4880 9.1)</td>
</tr>
<tr>
<td class="name"><code>publicMPIs</code></td>
<td class="type">
</td>
<td class="description last">[Array[openpgp_type_mpi]] algorithm dependent multiprecision integers</td>
</tr>
<tr>
<td class="name"><code>data</code></td>
<td class="type">
</td>
<td class="description last">[openpgp_type_mpi] data to be encrypted as MPI</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>openpgp.js, line 9163</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
[Object] if RSA an openpgp_type_mpi; if elgamal encryption an array of two
openpgp_type_mpi is returned; otherwise null
</div>
</dd>
<dt>
<h4 class="name" id="openpgp_crypto_generateKeyPair"><span class="type-signature"></span>openpgp_crypto_generateKeyPair</h4>
</dt>
<dd>
<div class="description">
calls the necessary crypto functions to generate a keypair. Called directly by openpgp.js
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>openpgp.js, line 9535</li></ul></dd>
</dl>
<h5>Returns:</h5>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">privateKey: [openpgp_packet_keymaterial] , publicKey: [openpgp_packet_keymaterial]</span>
</dd>
</dl>
</dd>
<dt>
<h4 class="name" id="openpgp_crypto_generateSessionKey"><span class="type-signature"></span>openpgp_crypto_generateSessionKey</h4>
</dt>
<dd>
<div class="description">
Generating a session key for the specified symmetric algorithm
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>algo</code></td>
<td class="type">
</td>
<td class="description last">[Integer] algorithm to use (see RFC4880 9.2)</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>openpgp.js, line 9278</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
[String] random bytes as a string to be used as a key
</div>
</dd>
<dt>
<h4 class="name" id="openpgp_crypto_getHashByteLength"><span class="type-signature"></span>openpgp_crypto_getHashByteLength</h4>
</dt>
<dd>
<div class="description">
returns the hash size in bytes of the specified hash algorithm type
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>algo</code></td>
<td class="type">
</td>
<td class="description last">[Integer] hash algorithm type (See RFC4880 9.4)</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>openpgp.js, line 9423</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
[Integer] size in bytes of the resulting hash
</div>
</dd>
<dt>
<h4 class="name" id="openpgp_crypto_getPrefixRandom"><span class="type-signature"></span>openpgp_crypto_getPrefixRandom</h4>
</dt>
<dd>
<div class="description">
generate random byte prefix as string for the specified algorithm
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>algo</code></td>
<td class="type">
</td>
<td class="description last">[Integer] algorithm to use (see RFC4880 9.2)</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>openpgp.js, line 9226</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
[String] random bytes with length equal to the block
size of the cipher
</div>
</dd>
<dt>
<h4 class="name" id="openpgp_crypto_getPseudoRandom"><span class="type-signature"></span>openpgp_crypto_getPseudoRandom</h4>
</dt>
<dd>
<div class="description">
return a pseudo-random number in the specified range
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>from</code></td>
<td class="type">
</td>
<td class="description last">[Integer] min of the random number</td>
</tr>
<tr>
<td class="name"><code>to</code></td>
<td class="type">
</td>
<td class="description last">[Integer] max of the random number (max 32bit)</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>openpgp.js, line 9462</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
[Integer] a pseudo random number
</div>
</dd>
<dt>
<h4 class="name" id="openpgp_crypto_getRandomBigInteger"><span class="type-signature"></span>openpgp_crypto_getRandomBigInteger</h4>
</dt>
<dd>
<div class="description">
create a secure random big integer of bits length
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>bits</code></td>
<td class="type">
</td>
<td class="description last">[Integer] bit length of the MPI to create</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>openpgp.js, line 9492</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
[BigInteger] resulting big integer
</div>
</dd>
<dt>
<h4 class="name" id="openpgp_crypto_getRandomBytes"><span class="type-signature"></span>openpgp_crypto_getRandomBytes</h4>
</dt>
<dd>
<div class="description">
retrieve secure random byte string of the specified length
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>length</code></td>
<td class="type">
</td>
<td class="description last">[Integer] length in bytes to generate</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>openpgp.js, line 9448</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
[String] random byte string
</div>
</dd>
<dt>
<h4 class="name" id="openpgp_crypto_getSecureRandom"><span class="type-signature"></span>openpgp_crypto_getSecureRandom</h4>
</dt>
<dd>
<div class="description">
return a secure random number in the specified range
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>from</code></td>
<td class="type">
</td>
<td class="description last">[Integer] min of the random number</td>
</tr>
<tr>
<td class="name"><code>to</code></td>
<td class="type">
</td>
<td class="description last">[Integer] max of the random number (max 32bit)</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>openpgp.js, line 9472</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
[Integer] a secure random number
</div>
</dd>
<dt>
<h4 class="name" id="openpgp_crypto_hashData"><span class="type-signature"></span>openpgp_crypto_hashData</h4>
</dt>
<dd>
<div class="description">
create a hash on the specified data using the specified algorithm
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>algo</code></td>
<td class="type">
</td>
<td class="description last">[Integer] hash algorithm type (see RFC4880 9.4)</td>
</tr>
<tr>
<td class="name"><code>data</code></td>
<td class="type">
</td>
<td class="description last">[String] data to be hashed</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>openpgp.js, line 9389</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
[String] hash value
</div>
</dd>
<dt>
<h4 class="name" id="openpgp_crypto_MDCSystemBytes"><span class="type-signature"></span>openpgp_crypto_MDCSystemBytes</h4>
</dt>
<dd>
<div class="description">
retrieve the MDC prefixed bytes by decrypting them
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>algo</code></td>
<td class="type">
</td>
<td class="description last">[Integer] algorithm to use (see RFC4880 9.2)</td>
</tr>
<tr>
<td class="name"><code>key</code></td>
<td class="type">
</td>
<td class="description last">[String] key as string. length is depending on the algorithm used</td>
</tr>
<tr>
<td class="name"><code>data</code></td>
<td class="type">
</td>
<td class="description last">[String] encrypted data where the prefix is decrypted from</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>openpgp.js, line 9249</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
[String] plain text data of the prefixed data
</div>
</dd>
<dt>
<h4 class="name" id="openpgp_crypto_signData"><span class="type-signature"></span>openpgp_crypto_signData</h4>
</dt>
<dd>
<div class="description">
Create a signature on data using the specified algorithm
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>hash_algo</code></td>
<td class="type">
</td>
<td class="description last">[Integer] hash algorithm to use (See RFC4880 9.4)</td>
</tr>
<tr>
<td class="name"><code>algo</code></td>
<td class="type">
</td>
<td class="description last">[Integer] asymmetric cipher algorithm to use (See RFC4880 9.1)</td>
</tr>
<tr>
<td class="name"><code>publicMPIs</code></td>
<td class="type">
</td>
<td class="description last">[Array[openpgp_type_mpi]] public key multiprecision integers of the private key</td>
</tr>
<tr>
<td class="name"><code>secretMPIs</code></td>
<td class="type">
</td>
<td class="description last">[Array[openpgp_type_mpi]] private key multiprecision integers which is used to sign the data</td>
</tr>
<tr>
<td class="name"><code>data</code></td>
<td class="type">
</td>
<td class="description last">[String] data to be signed</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>openpgp.js, line 9351</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
[String or openpgp_type_mpi]
</div>
</dd>
<dt>
<h4 class="name" id="openpgp_crypto_symmetricDecrypt"><span class="type-signature"></span>openpgp_crypto_symmetricDecrypt</h4>
</dt>
<dd>
<div class="description">
Symmetrically decrypts data using a key with length depending on the
algorithm in openpgp_cfb mode with or without resync (MDC style)
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>algo</code></td>
<td class="type">
</td>
<td class="description last">[Integer] algorithm to use (see RFC4880 9.2)</td>
</tr>
<tr>
<td class="name"><code>key</code></td>
<td class="type">
</td>
<td class="description last">[String] key as string. length is depending on the algorithm used</td>
</tr>
<tr>
<td class="name"><code>data</code></td>
<td class="type">
</td>
<td class="description last">[String] data to be decrypted</td>
</tr>
<tr>
<td class="name"><code>openpgp_cfb</code></td>
<td class="type">
</td>
<td class="description last">[boolean] if true use the resync (for encrypteddata);
otherwise use without the resync (for MDC encrypted data)</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>openpgp.js, line 8824</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
[String] plaintext data
</div>
</dd>
<dt>
<h4 class="name" id="openpgp_crypto_symmetricEncrypt"><span class="type-signature"></span>openpgp_crypto_symmetricEncrypt</h4>
</dt>
<dd>
<div class="description">
Symmetrically encrypts data using prefixedrandom, a key with length
depending on the algorithm in openpgp_cfb mode with or without resync
(MDC style)
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>prefixrandom</code></td>
<td class="type">
</td>
<td class="description last">secure random bytes as string in length equal to the
block size of the algorithm used (use openpgp_crypto_getPrefixRandom(algo)
to retrieve that string</td>
</tr>
<tr>
<td class="name"><code>algo</code></td>
<td class="type">
</td>
<td class="description last">[Integer] algorithm to use (see RFC4880 9.2)</td>
</tr>
<tr>
<td class="name"><code>key</code></td>
<td class="type">
</td>
<td class="description last">[String] key as string. length is depending on the algorithm used</td>
</tr>
<tr>
<td class="name"><code>data</code></td>
<td class="type">
</td>
<td class="description last">[String] data to encrypt</td>
</tr>
<tr>
<td class="name"><code>openpgp_cfb</code></td>
<td class="type">
</td>
<td class="description last">[boolean]</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>openpgp.js, line 8790</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
[String] encrypted data
</div>
</dd>
<dt>
<h4 class="name" id="openpgp_crypto_verifySignature"><span class="type-signature"></span>openpgp_crypto_verifySignature</h4>
</dt>
<dd>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>algo</code></td>
<td class="type">
</td>
<td class="description last">[Integer] public key algorithm</td>
</tr>
<tr>
<td class="name"><code>hash_algo</code></td>
<td class="type">
</td>
<td class="description last">[Integer] hash algorithm</td>
</tr>
<tr>
<td class="name"><code>msg_MPIs</code></td>
<td class="type">
</td>
<td class="description last">[Array[openpgp_type_mpi]] signature multiprecision integers</td>
</tr>
<tr>
<td class="name"><code>publickey_MPIs</code></td>
<td class="type">
</td>
<td class="description last">[Array[openpgp_type_mpi]] public key multiprecision integers</td>
</tr>
<tr>
<td class="name"><code>data</code></td>
<td class="type">
</td>
<td class="description last">[String] data on where the signature was computed on.</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>openpgp.js, line 9304</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
true if signature (sig_data was equal to data over hash)
</div>
</dd>
<dt>
<h4 class="name" id="openpgp_encoding_armor"><span class="type-signature"></span>openpgp_encoding_armor</h4>
</dt>
<dd>
<div class="description">
Armor an OpenPGP binary packet block
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>messagetype</code></td>
<td class="type">
</td>
<td class="description last">type of the message</td>
</tr>
<tr>
<td class="name"><code>data</code></td>
<td class="type">
</td>
<td class="description last"></td>
</tr>
<tr>
<td class="name"><code>partindex</code></td>
<td class="type">
</td>
<td class="description last"></td>
</tr>
<tr>
<td class="name"><code>parttotal</code></td>
<td class="type">
</td>
<td class="description last"></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>openpgp.js, line 10780</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
Armored text
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">string</span>
</dd>
</dl>
</dd>
<dt>
<h4 class="name" id="openpgp_encoding_armor_addheader"><span class="type-signature"></span>openpgp_encoding_armor_addheader</h4>
</dt>
<dd>
<div class="description">
Add additional information to the armor version of an OpenPGP binary
packet block.
</div>
<dl class="details">
<dt class="tag-version">Version:</dt>
<dd class="tag-version"><ul class="dummy"><li>2011-12-16</li></ul></dd>
<dt class="tag-author">Author:</dt>
<dd class="tag-author">
<ul>
<li>Alex</li>
</ul>
</dd>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>openpgp.js, line 10760</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
The header information
</div>
</dd>
<dt>
<h4 class="name" id="openpgp_encoding_base64_decode"><span class="type-signature"></span>openpgp_encoding_base64_decode</h4>
</dt>
<dd>
<div class="description">
Wrapper function for the base64 codec.
This function decodes a String(message) in base64 (radix-64)
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>message</code></td>
<td class="type">
</td>
<td class="description last">[String] base64 encoded data</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>openpgp.js, line 10473</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
[String] raw data after decoding
</div>
</dd>
<dt>
<h4 class="name" id="openpgp_encoding_base64_encode"><span class="type-signature"></span>openpgp_encoding_base64_encode</h4>
</dt>
<dd>
<div class="description">
Wrapper function for the base64 codec.
This function encodes a String (message) in base64 (radix-64)
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>message</code></td>
<td class="type">
</td>
<td class="description last">[String] the message to encode</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>openpgp.js, line 10462</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
[String] the base64 encoded data
</div>
</dd>
<dt>
<h4 class="name" id="openpgp_encoding_deArmor"><span class="type-signature"></span>openpgp_encoding_deArmor</h4>
</dt>
<dd>
<div class="description">
DeArmor an OpenPGP armored message; verify the checksum and return the encoded bytes
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>openpgp.js, line 10677</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
either the bytes of the decoded message or an object with attribute "text" containing the message text
and an attribute "openpgp" containing the bytes.
</div>
</dd>
<dt>
<h4 class="name" id="openpgp_encoding_eme_pkcs1_decode"><span class="type-signature"></span>openpgp_encoding_eme_pkcs1_decode</h4>
</dt>
<dd>
<div class="description">
decodes a EME-PKCS1-v1_5 padding (See RFC4880 13.1.2)
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>message</code></td>
<td class="type">
</td>
<td class="description last">[String] EME-PKCS1 padded message</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>openpgp.js, line 10514</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
[String] decoded message
</div>
</dd>
<dt>
<h4 class="name" id="openpgp_encoding_eme_pkcs1_encode"><span class="type-signature"></span>openpgp_encoding_eme_pkcs1_encode</h4>
</dt>
<dd>
<div class="description">
create a EME-PKCS1-v1_5 padding (See RFC4880 13.1.1)
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>message</code></td>
<td class="type">
</td>
<td class="description last">[String] message to be padded</td>
</tr>
<tr>
<td class="name"><code>length</code></td>
<td class="type">
</td>
<td class="description last">[Integer] length to the resulting message</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>openpgp.js, line 10495</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
[String] EME-PKCS1 padded message
</div>
</dd>
<dt>
<h4 class="name" id="openpgp_encoding_emsa_pkcs1_decode"><span class="type-signature"></span>openpgp_encoding_emsa_pkcs1_decode</h4>
</dt>
<dd>
<div class="description">
extract the hash out of an EMSA-PKCS1-v1.5 padding (See RFC4880 13.1.3)
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>data</code></td>
<td class="type">
</td>
<td class="description last">[String] hash in pkcs1 encoding</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>openpgp.js, line 10563</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
the hash as string
</div>
</dd>
<dt>
<h4 class="name" id="openpgp_encoding_emsa_pkcs1_encode"><span class="type-signature"></span>openpgp_encoding_emsa_pkcs1_encode</h4>
</dt>
<dd>
<div class="description">
create a EMSA-PKCS1-v1_5 padding (See RFC4880 13.1.3)
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>algo</code></td>
<td class="type">
</td>
<td class="description last">[Integer] hash algorithm type used</td>
</tr>
<tr>
<td class="name"><code>data</code></td>
<td class="type">
</td>
<td class="description last">[String] data to be hashed</td>
</tr>
<tr>
<td class="name"><code>keylength</code></td>
<td class="type">
</td>
<td class="description last">[Integer] key size of the public mpi in bytes</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>openpgp.js, line 10543</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
the [String] hashcode with pkcs1padding as string
</div>
</dd>
<dt>
<h4 class="name" id="openpgp_encoding_html_encode"><span class="type-signature"></span>openpgp_encoding_html_encode</h4>
</dt>
<dd>
<div class="description">
Wrapper function for jquery library.
This function escapes HTML characters within a string. This is used to prevent XSS.
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>message</code></td>
<td class="type">
</td>
<td class="description last">[String] message to escape</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>openpgp.js, line 10483</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
[String] html encoded string
</div>
</dd>
<dt>
<h4 class="name" id="openpgp_packet_compressed"><span class="type-signature"></span>openpgp_packet_compressed</h4>
</dt>
<dd>
<div class="description">
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.
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>openpgp.js, line 2532</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="openpgp_packet_encrypteddata"><span class="type-signature"></span>openpgp_packet_encrypteddata</h4>
</dt>
<dd>
<div class="description">
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).
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>openpgp.js, line 1868</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="openpgp_packet_encryptedintegrityprotecteddata"><span class="type-signature"></span>openpgp_packet_encryptedintegrityprotecteddata</h4>
</dt>
<dd>
<div class="description">
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.
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>openpgp.js, line 963</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="openpgp_packet_encryptedsessionkey"><span class="type-signature"></span>openpgp_packet_encryptedsessionkey</h4>
</dt>
<dd>
<div class="description">
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.
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>openpgp.js, line 1540</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="openpgp_packet_keymaterial"><span class="type-signature"></span>openpgp_packet_keymaterial</h4>
</dt>
<dd>
<div class="description">
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.
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>openpgp.js, line 2693</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="openpgp_packet_literaldata"><span class="type-signature"></span>openpgp_packet_literaldata</h4>
</dt>
<dd>
<div class="description">
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.
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>openpgp.js, line 1765</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="openpgp_packet_marker"><span class="type-signature"></span>openpgp_packet_marker</h4>
</dt>
<dd>
<div class="description">
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.
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>openpgp.js, line 145</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="openpgp_packet_modificationdetectioncode"><span class="type-signature"></span>openpgp_packet_modificationdetectioncode</h4>
</dt>
<dd>
<div class="description">
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.
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>openpgp.js, line 1123</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="openpgp_packet_onepasssignature"><span class="type-signature"></span>openpgp_packet_onepasssignature</h4>
</dt>
<dd>
<div class="description">
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.
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>openpgp.js, line 28</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="openpgp_packet_signature"><span class="type-signature"></span>openpgp_packet_signature</h4>
</dt>
<dd>
<div class="description">
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.
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>openpgp.js, line 206</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="openpgp_packet_userattribute"><span class="type-signature"></span>openpgp_packet_userattribute</h4>
</dt>
<dd>
<div class="description">
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.
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>openpgp.js, line 1977</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="openpgp_packet_userid"><span class="type-signature"></span>openpgp_packet_userid</h4>
</dt>
<dd>
<div class="description">
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.
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>openpgp.js, line 1199</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="openpgp_type_keyid"><span class="type-signature"></span>openpgp_type_keyid</h4>
</dt>
<dd>
<div class="description">
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.
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>openpgp.js, line 14601</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="openpgp_type_mpi"><span class="type-signature"></span>openpgp_type_mpi</h4>
</dt>
<dd>
<div class="description">
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.
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>openpgp.js, line 14476</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="openpgp_type_s2k"><span class="type-signature"></span>openpgp_type_s2k</h4>
</dt>
<dd>
<div class="description">
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.
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>openpgp.js, line 14649</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="print_debug"><span class="type-signature"></span>print_debug</h4>
</dt>
<dd>
<div class="description">
Helper function to print a debug message. Debug
messages are only printed if
openpgp.config.debug is set to true. The calling
Javascript context MUST define
a "showMessages(text)" function. Line feeds ('\n')
are automatically converted to HTML line feeds '<br/>'
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>str</code></td>
<td class="type">
</td>
<td class="description last">[String] string of the debug message</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>openpgp.js, line 15159</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
[String] an HTML tt entity containing a paragraph with a style attribute where the debug message is HTMLencoded in.
</div>
</dd>
<dt>
<h4 class="name" id="print_debug_hexstr_dump"><span class="type-signature"></span>print_debug_hexstr_dump</h4>
</dt>
<dd>
<div class="description">
Helper function to print a debug message. Debug
messages are only printed if
openpgp.config.debug is set to true. The calling
Javascript context MUST define
a "showMessages(text)" function. Line feeds ('\n')
are automatically converted to HTML line feeds '<br/>'
Different than print_debug because will call hexstrdump iff necessary.
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>str</code></td>
<td class="type">
</td>
<td class="description last">[String] string of the debug message</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>openpgp.js, line 15177</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
[String] an HTML tt entity containing a paragraph with a style attribute where the debug message is HTMLencoded in.
</div>
</dd>
<dt>
<h4 class="name" id="print_error"><span class="type-signature"></span>print_error</h4>
</dt>
<dd>
<div class="description">
Helper function to print an error message.
The calling Javascript context MUST define
a "showMessages(text)" function. Line feeds ('\n')
are automatically converted to HTML line feeds '<br/>'
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>str</code></td>
<td class="type">
</td>
<td class="description last">[String] string of the error message</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>openpgp.js, line 15193</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
[String] a HTML paragraph entity with a style attribute containing the HTML encoded error message
</div>
</dd>
<dt>
<h4 class="name" id="print_info"><span class="type-signature"></span>print_info</h4>
</dt>
<dd>
<div class="description">
Helper function to print an info message.
The calling Javascript context MUST define
a "showMessages(text)" function. Line feeds ('\n')
are automatically converted to HTML line feeds '<br/>'.
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>str</code></td>
<td class="type">
</td>
<td class="description last">[String] string of the info message</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>openpgp.js, line 15206</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
[String] a HTML paragraph entity with a style attribute containing the HTML encoded info message
</div>
</dd>
<dt>
<h4 class="name" id="shiftRight"><span class="type-signature"></span>shiftRight</h4>
</dt>
<dd>
<div class="description">
Shifting a string to n bits right
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>value</code></td>
<td class="type">
</td>
<td class="description last">[String] the string to shift</td>
</tr>
<tr>
<td class="name"><code>bitcount</code></td>
<td class="type">
</td>
<td class="description last">[Integer] amount of bits to shift (MUST be smaller than 9)</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>openpgp.js, line 15230</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
[String] resulting string.
</div>
</dd>
<dt>
<h4 class="name" id="str2bin"><span class="type-signature"></span>str2bin</h4>
</dt>
<dd>
<div class="description">
convert a string to an array of integers(0.255)
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Argument</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>String</code></td>
<td class="type">
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="description last">string to convert</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>openpgp.js, line 15088</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
[Array [Integer 0..255]] array of (binary) integers
</div>
</dd>
<dt>
<h4 class="name" id="str2Uint8Array"><span class="type-signature"></span>str2Uint8Array</h4>
</dt>
<dd>
<div class="description">
convert a string to a Uint8Array
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Argument</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>String</code></td>
<td class="type">
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="description last">string to convert</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>openpgp.js, line 15115</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
[Uint8Array] array of (binary) integers
</div>
</dd>
<dt>
<h4 class="name" id="Uint8Array2str"><span class="type-signature"></span>Uint8Array2str</h4>
</dt>
<dd>
<div class="description">
convert a Uint8Array to a string. This currently functions the same as bin2str.
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Argument</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>Uint8Array</code></td>
<td class="type">
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="description last">array of (binary) integers to convert</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>openpgp.js, line 15128</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
[String] string representation of the array
</div>
</dd>
<dt>
<h4 class="name" id="verifyCheckSum"><span class="type-signature"></span>verifyCheckSum</h4>
</dt>
<dd>
<div class="description">
Calculates the checksum over the given data and compares it with the given base64 encoded checksum
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>data</code></td>
<td class="type">
</td>
<td class="description last">[String] data to create a CRC-24 checksum for</td>
</tr>
<tr>
<td class="name"><code>checksum</code></td>
<td class="type">
</td>
<td class="description last">[String] base64 encoded checksum</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>openpgp.js, line 10851</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
true if the given checksum is correct; otherwise false
</div>
</dd>
</dl>
</article>
</section>
</div>
<nav>
<h2><a href="index.html">Index</a></h2><h3>Classes</h3><ul><li><a href="JXG.Util.html">Util</a></li><li><a href="openpgp.html">openpgp</a></li></ul><h3>Global</h3><ul><li><a href="global.html#MD5">MD5</a></li><li><a href="global.html#Uint8Array2str">Uint8Array2str</a></li><li><a href="global.html#bin2str">bin2str</a></li><li><a href="global.html#calc_checksum">calc_checksum</a></li><li><a href="global.html#crc_table">crc_table</a></li><li><a href="global.html#debug">debug</a></li><li><a href="global.html#default_config">default_config</a></li><li><a href="global.html#getCheckSum">getCheckSum</a></li><li><a href="global.html#getPGPMessageType">getPGPMessageType</a></li><li><a href="global.html#get_hashAlgorithmString">get_hashAlgorithmString</a></li><li><a href="global.html#hash_headers">hash_headers</a></li><li><a href="global.html#hex2bin">hex2bin</a></li><li><a href="global.html#hexidump">hexidump</a></li><li><a href="global.html#hexstrdump">hexstrdump</a></li><li><a href="global.html#openpgp_cfb_decrypt">openpgp_cfb_decrypt</a></li><li><a href="global.html#openpgp_cfb_encrypt">openpgp_cfb_encrypt</a></li><li><a href="global.html#openpgp_cfb_mdc">openpgp_cfb_mdc</a></li><li><a href="global.html#openpgp_config">openpgp_config</a></li><li><a href="global.html#openpgp_crypto_MDCSystemBytes">openpgp_crypto_MDCSystemBytes</a></li><li><a href="global.html#openpgp_crypto_asymetricDecrypt">openpgp_crypto_asymetricDecrypt</a></li><li><a href="global.html#openpgp_crypto_asymetricEncrypt">openpgp_crypto_asymetricEncrypt</a></li><li><a href="global.html#openpgp_crypto_generateKeyPair">openpgp_crypto_generateKeyPair</a></li><li><a href="global.html#openpgp_crypto_generateSessionKey">openpgp_crypto_generateSessionKey</a></li><li><a href="global.html#openpgp_crypto_getHashByteLength">openpgp_crypto_getHashByteLength</a></li><li><a href="global.html#openpgp_crypto_getPrefixRandom">openpgp_crypto_getPrefixRandom</a></li><li><a href="global.html#openpgp_crypto_getPseudoRandom">openpgp_crypto_getPseudoRandom</a></li><li><a href="global.html#openpgp_crypto_getRandomBigInteger">openpgp_crypto_getRandomBigInteger</a></li><li><a href="global.html#openpgp_crypto_getRandomBytes">openpgp_crypto_getRandomBytes</a></li><li><a href="global.html#openpgp_crypto_getSecureRandom">openpgp_crypto_getSecureRandom</a></li><li><a href="global.html#openpgp_crypto_hashData">openpgp_crypto_hashData</a></li><li><a href="global.html#openpgp_crypto_signData">openpgp_crypto_signData</a></li><li><a href="global.html#openpgp_crypto_symmetricDecrypt">openpgp_crypto_symmetricDecrypt</a></li><li><a href="global.html#openpgp_crypto_symmetricEncrypt">openpgp_crypto_symmetricEncrypt</a></li><li><a href="global.html#openpgp_crypto_verifySignature">openpgp_crypto_verifySignature</a></li><li><a href="global.html#openpgp_encoding_armor">openpgp_encoding_armor</a></li><li><a href="global.html#openpgp_encoding_armor_addheader">openpgp_encoding_armor_addheader</a></li><li><a href="global.html#openpgp_encoding_base64_decode">openpgp_encoding_base64_decode</a></li><li><a href="global.html#openpgp_encoding_base64_encode">openpgp_encoding_base64_encode</a></li><li><a href="global.html#openpgp_encoding_deArmor">openpgp_encoding_deArmor</a></li><li><a href="global.html#openpgp_encoding_eme_pkcs1_decode">openpgp_encoding_eme_pkcs1_decode</a></li><li><a href="global.html#openpgp_encoding_eme_pkcs1_encode">openpgp_encoding_eme_pkcs1_encode</a></li><li><a href="global.html#openpgp_encoding_emsa_pkcs1_decode">openpgp_encoding_emsa_pkcs1_decode</a></li><li><a href="global.html#openpgp_encoding_emsa_pkcs1_encode">openpgp_encoding_emsa_pkcs1_encode</a></li><li><a href="global.html#openpgp_encoding_html_encode">openpgp_encoding_html_encode</a></li><li><a href="global.html#openpgp_packet_compressed">openpgp_packet_compressed</a></li><li><a href="global.html#openpgp_packet_encrypteddata">openpgp_packet_encrypteddata</a></li><li><a href="global.html#openpgp_packet_encryptedintegrityprotecteddata">openpgp_packet_encryptedintegrityprotecteddata</a></li><li><a href="global.html#openpgp_packet_encryptedsessionkey">openpgp_packet_encryptedsessionkey</a></li><li><a href="global.html#openpgp_packet_keymaterial">openpgp_packet_keymaterial</a></li><li><a href="global.html#openpgp_packet_literaldata">openpgp_packet_literaldata</a></li><li><a href="global.html#openpgp_packet_marker">openpgp_packet_marker</a></li><li><a href="global.html#openpgp_packet_modificationdetectioncode">openpgp_packet_modificationdetectioncode</a></li><li><a href="global.html#openpgp_packet_onepasssignature">openpgp_packet_onepasssignature</a></li><li><a href="global.html#openpgp_packet_signature">openpgp_packet_signature</a></li><li><a href="global.html#openpgp_packet_userattribute">openpgp_packet_userattribute</a></li><li><a href="global.html#openpgp_packet_userid">openpgp_packet_userid</a></li><li><a href="global.html#openpgp_type_keyid">openpgp_type_keyid</a></li><li><a href="global.html#openpgp_type_mpi">openpgp_type_mpi</a></li><li><a href="global.html#openpgp_type_s2k">openpgp_type_s2k</a></li><li><a href="global.html#print_debug">print_debug</a></li><li><a href="global.html#print_debug_hexstr_dump">print_debug_hexstr_dump</a></li><li><a href="global.html#print_error">print_error</a></li><li><a href="global.html#print_info">print_info</a></li><li><a href="global.html#shiftRight">shiftRight</a></li><li><a href="global.html#str2Uint8Array">str2Uint8Array</a></li><li><a href="global.html#str2bin">str2bin</a></li><li><a href="global.html#util">util</a></li><li><a href="global.html#verifyCheckSum">verifyCheckSum</a></li></ul>
</nav>
<br clear="both">
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3</a> on Tue Aug 21 2012 23:21:02 GMT-0400 (EDT)
</footer>
<script> sh_highlightDocument(); </script>
</body>
</html>