mirror of
				https://github.com/openpgpjs/openpgpjs.git
				synced 2025-10-14 00:59:29 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			2472 lines
		
	
	
		
			33 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
			
		
		
	
	
			2472 lines
		
	
	
		
			33 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
| <!DOCTYPE html>
 | |
| <html lang="en">
 | |
| <head>
 | |
|     <meta charset="utf-8">
 | |
|     <title>JSDoc: Class: PublicKeyPacket</title>
 | |
| 
 | |
|     <script src="scripts/prettify/prettify.js"> </script>
 | |
|     <script src="scripts/prettify/lang-css.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/prettify-tomorrow.css">
 | |
|     <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
 | |
| </head>
 | |
| 
 | |
| <body>
 | |
| 
 | |
| <div id="main">
 | |
| 
 | |
|     <h1 class="page-title">Class: PublicKeyPacket</h1>
 | |
| 
 | |
|     
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| <section>
 | |
| 
 | |
| <header>
 | |
|     
 | |
|         <h2><span class="attribs"><span class="type-signature"></span></span>PublicKeyPacket<span class="signature">(date<span class="signature-attributes">opt</span>, config<span class="signature-attributes">opt</span>)</span><span class="type-signature"></span></h2>
 | |
|         
 | |
|             <div class="class-description"><p>Implementation of the Key Material Packet (Tag 5,6,7,14)</p>
 | |
| <p><a href="https://tools.ietf.org/html/rfc4880#section-5.5">RFC4480 5.5</a>:
 | |
| 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.</p>
 | |
| <p>A Public-Key packet starts a series of packets that forms an OpenPGP
 | |
| key (sometimes called an OpenPGP certificate).</p></div>
 | |
|         
 | |
|     
 | |
| </header>
 | |
| 
 | |
| <article>
 | |
|     <div class="container-overview">
 | |
|     
 | |
|         
 | |
| 
 | |
|     
 | |
|     <h2>Constructor</h2>
 | |
|     
 | |
| 
 | |
|     
 | |
|     <h4 class="name" id="PublicKeyPacket"><span class="type-signature"></span>new PublicKeyPacket<span class="signature">(date<span class="signature-attributes">opt</span>, config<span class="signature-attributes">opt</span>)</span><span class="type-signature"></span></h4>
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
|     <h5>Parameters:</h5>
 | |
|     
 | |
| 
 | |
| <table class="params">
 | |
|     <thead>
 | |
|     <tr>
 | |
|         
 | |
|         <th>Name</th>
 | |
|         
 | |
| 
 | |
|         <th>Type</th>
 | |
| 
 | |
|         
 | |
|         <th>Attributes</th>
 | |
|         
 | |
| 
 | |
|         
 | |
| 
 | |
|         <th class="last">Description</th>
 | |
|     </tr>
 | |
|     </thead>
 | |
| 
 | |
|     <tbody>
 | |
|     
 | |
| 
 | |
|         <tr>
 | |
|             
 | |
|                 <td class="name"><code>date</code></td>
 | |
|             
 | |
| 
 | |
|             <td class="type">
 | |
|             
 | |
|                 
 | |
| <span class="param-type">Date</span>
 | |
| 
 | |
| 
 | |
|             
 | |
|             </td>
 | |
| 
 | |
|             
 | |
|                 <td class="attributes">
 | |
|                 
 | |
|                     <optional><br>
 | |
|                 
 | |
| 
 | |
|                 
 | |
| 
 | |
|                 
 | |
|                 </td>
 | |
|             
 | |
| 
 | |
|             
 | |
| 
 | |
|             <td class="description last"><p>Creation date</p></td>
 | |
|         </tr>
 | |
| 
 | |
|     
 | |
| 
 | |
|         <tr>
 | |
|             
 | |
|                 <td class="name"><code>config</code></td>
 | |
|             
 | |
| 
 | |
|             <td class="type">
 | |
|             
 | |
|                 
 | |
| <span class="param-type">Object</span>
 | |
| 
 | |
| 
 | |
|             
 | |
|             </td>
 | |
| 
 | |
|             
 | |
|                 <td class="attributes">
 | |
|                 
 | |
|                     <optional><br>
 | |
|                 
 | |
| 
 | |
|                 
 | |
| 
 | |
|                 
 | |
|                 </td>
 | |
|             
 | |
| 
 | |
|             
 | |
| 
 | |
|             <td class="description last"><p>Full configuration, defaults to openpgp.config</p></td>
 | |
|         </tr>
 | |
| 
 | |
|     
 | |
|     </tbody>
 | |
| </table>
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| <dl class="details">
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
|     <dt class="tag-source">Source:</dt>
 | |
|     <dd class="tag-source"><ul class="dummy"><li>
 | |
|         <a href="https://github.com/openpgpjs/openpgpjs/blob/v6.1.0/src/packet/public_key.js">packet/public_key.js</a>, <a href="https://github.com/openpgpjs/openpgpjs/blob/v6.1.0/src/packet/public_key.js#L36">line 36</a>
 | |
|     </li></ul></dd>
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| </dl>
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
|     
 | |
|     </div>
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
|         <h3 class="subsection-title">Members</h3>
 | |
| 
 | |
|         
 | |
|             
 | |
| <h4 class="name" id="algorithm"><span class="type-signature"></span>algorithm<span class="type-signature"> :enums.publicKey</span></h4>
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| <div class="description">
 | |
|     <p>Public key algorithm.</p>
 | |
| </div>
 | |
| 
 | |
| 
 | |
| 
 | |
|     <h5>Type:</h5>
 | |
|     <ul>
 | |
|         <li>
 | |
|             
 | |
| <span class="param-type">enums.publicKey</span>
 | |
| 
 | |
| 
 | |
|         </li>
 | |
|     </ul>
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| <dl class="details">
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
|     <dt class="tag-source">Source:</dt>
 | |
|     <dd class="tag-source"><ul class="dummy"><li>
 | |
|         <a href="https://github.com/openpgpjs/openpgpjs/blob/v6.1.0/src/packet/public_key.js">packet/public_key.js</a>, <a href="https://github.com/openpgpjs/openpgpjs/blob/v6.1.0/src/packet/public_key.js#L60">line 60</a>
 | |
|     </li></ul></dd>
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| </dl>
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
|         
 | |
|             
 | |
| <h4 class="name" id="created"><span class="type-signature"></span>created<span class="type-signature"> :Date</span></h4>
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| <div class="description">
 | |
|     <p>Key creation date.</p>
 | |
| </div>
 | |
| 
 | |
| 
 | |
| 
 | |
|     <h5>Type:</h5>
 | |
|     <ul>
 | |
|         <li>
 | |
|             
 | |
| <span class="param-type">Date</span>
 | |
| 
 | |
| 
 | |
|         </li>
 | |
|     </ul>
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| <dl class="details">
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
|     <dt class="tag-source">Source:</dt>
 | |
|     <dd class="tag-source"><ul class="dummy"><li>
 | |
|         <a href="https://github.com/openpgpjs/openpgpjs/blob/v6.1.0/src/packet/public_key.js">packet/public_key.js</a>, <a href="https://github.com/openpgpjs/openpgpjs/blob/v6.1.0/src/packet/public_key.js#L55">line 55</a>
 | |
|     </li></ul></dd>
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| </dl>
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
|         
 | |
|             
 | |
| <h4 class="name" id="expirationTimeV3"><span class="type-signature"></span>expirationTimeV3<span class="type-signature"> :Integer</span></h4>
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| <div class="description">
 | |
|     <p>Time until expiration in days (V3 only)</p>
 | |
| </div>
 | |
| 
 | |
| 
 | |
| 
 | |
|     <h5>Type:</h5>
 | |
|     <ul>
 | |
|         <li>
 | |
|             
 | |
| <span class="param-type">Integer</span>
 | |
| 
 | |
| 
 | |
|         </li>
 | |
|     </ul>
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| <dl class="details">
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
|     <dt class="tag-source">Source:</dt>
 | |
|     <dd class="tag-source"><ul class="dummy"><li>
 | |
|         <a href="https://github.com/openpgpjs/openpgpjs/blob/v6.1.0/src/packet/public_key.js">packet/public_key.js</a>, <a href="https://github.com/openpgpjs/openpgpjs/blob/v6.1.0/src/packet/public_key.js#L70">line 70</a>
 | |
|     </li></ul></dd>
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| </dl>
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
|         
 | |
|             
 | |
| <h4 class="name" id="fingerprint"><span class="type-signature"></span>fingerprint<span class="type-signature"> :Uint8Array</span></h4>
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| <div class="description">
 | |
|     <p>Fingerprint bytes</p>
 | |
| </div>
 | |
| 
 | |
| 
 | |
| 
 | |
|     <h5>Type:</h5>
 | |
|     <ul>
 | |
|         <li>
 | |
|             
 | |
| <span class="param-type">Uint8Array</span>
 | |
| 
 | |
| 
 | |
|         </li>
 | |
|     </ul>
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| <dl class="details">
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
|     <dt class="tag-source">Source:</dt>
 | |
|     <dd class="tag-source"><ul class="dummy"><li>
 | |
|         <a href="https://github.com/openpgpjs/openpgpjs/blob/v6.1.0/src/packet/public_key.js">packet/public_key.js</a>, <a href="https://github.com/openpgpjs/openpgpjs/blob/v6.1.0/src/packet/public_key.js#L75">line 75</a>
 | |
|     </li></ul></dd>
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| </dl>
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
|         
 | |
|             
 | |
| <h4 class="name" id="keyID"><span class="type-signature"></span>keyID<span class="type-signature"> :<a href="module-type_keyid-KeyID.html">module:type/keyid~KeyID</a></span></h4>
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| <div class="description">
 | |
|     <p>KeyID</p>
 | |
| </div>
 | |
| 
 | |
| 
 | |
| 
 | |
|     <h5>Type:</h5>
 | |
|     <ul>
 | |
|         <li>
 | |
|             
 | |
| <span class="param-type"><a href="module-type_keyid-KeyID.html">module:type/keyid~KeyID</a></span>
 | |
| 
 | |
| 
 | |
|         </li>
 | |
|     </ul>
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| <dl class="details">
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
|     <dt class="tag-source">Source:</dt>
 | |
|     <dd class="tag-source"><ul class="dummy"><li>
 | |
|         <a href="https://github.com/openpgpjs/openpgpjs/blob/v6.1.0/src/packet/public_key.js">packet/public_key.js</a>, <a href="https://github.com/openpgpjs/openpgpjs/blob/v6.1.0/src/packet/public_key.js#L80">line 80</a>
 | |
|     </li></ul></dd>
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| </dl>
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
|         
 | |
|             
 | |
| <h4 class="name" id="publicParams"><span class="type-signature"></span>publicParams<span class="type-signature"> :Object</span></h4>
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| <div class="description">
 | |
|     <p>Algorithm specific public params</p>
 | |
| </div>
 | |
| 
 | |
| 
 | |
| 
 | |
|     <h5>Type:</h5>
 | |
|     <ul>
 | |
|         <li>
 | |
|             
 | |
| <span class="param-type">Object</span>
 | |
| 
 | |
| 
 | |
|         </li>
 | |
|     </ul>
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| <dl class="details">
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
|     <dt class="tag-source">Source:</dt>
 | |
|     <dd class="tag-source"><ul class="dummy"><li>
 | |
|         <a href="https://github.com/openpgpjs/openpgpjs/blob/v6.1.0/src/packet/public_key.js">packet/public_key.js</a>, <a href="https://github.com/openpgpjs/openpgpjs/blob/v6.1.0/src/packet/public_key.js#L65">line 65</a>
 | |
|     </li></ul></dd>
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| </dl>
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
|         
 | |
|             
 | |
| <h4 class="name" id="readPublicKey"><span class="type-signature"></span>readPublicKey<span class="type-signature"></span></h4>
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| <div class="description">
 | |
|     <p>Alias of read()</p>
 | |
| </div>
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| <dl class="details">
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
|     <dt class="tag-source">Source:</dt>
 | |
|     <dd class="tag-source"><ul class="dummy"><li>
 | |
|         <a href="https://github.com/openpgpjs/openpgpjs/blob/v6.1.0/src/packet/public_key.js">packet/public_key.js</a>, <a href="https://github.com/openpgpjs/openpgpjs/blob/v6.1.0/src/packet/public_key.js#L287">line 287</a>
 | |
|     </li></ul></dd>
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
|     <dt class="tag-see">See:</dt>
 | |
|     <dd class="tag-see">
 | |
|         <ul>
 | |
|             <li><a href="PublicKeyPacket.html#read">PublicKeyPacket#read</a></li>
 | |
|         </ul>
 | |
|     </dd>
 | |
|     
 | |
| 
 | |
|     
 | |
| </dl>
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
|         
 | |
|             
 | |
| <h4 class="name" id="version"><span class="type-signature"></span>version<span class="type-signature"> :Integer</span></h4>
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| <div class="description">
 | |
|     <p>Packet version</p>
 | |
| </div>
 | |
| 
 | |
| 
 | |
| 
 | |
|     <h5>Type:</h5>
 | |
|     <ul>
 | |
|         <li>
 | |
|             
 | |
| <span class="param-type">Integer</span>
 | |
| 
 | |
| 
 | |
|         </li>
 | |
|     </ul>
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| <dl class="details">
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
|     <dt class="tag-source">Source:</dt>
 | |
|     <dd class="tag-source"><ul class="dummy"><li>
 | |
|         <a href="https://github.com/openpgpjs/openpgpjs/blob/v6.1.0/src/packet/public_key.js">packet/public_key.js</a>, <a href="https://github.com/openpgpjs/openpgpjs/blob/v6.1.0/src/packet/public_key.js#L50">line 50</a>
 | |
|     </li></ul></dd>
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| </dl>
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
|         
 | |
|             
 | |
| <h4 class="name" id="writePublicKey"><span class="type-signature"></span>writePublicKey<span class="type-signature"></span></h4>
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| <div class="description">
 | |
|     <p>Alias of write()</p>
 | |
| </div>
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| <dl class="details">
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
|     <dt class="tag-source">Source:</dt>
 | |
|     <dd class="tag-source"><ul class="dummy"><li>
 | |
|         <a href="https://github.com/openpgpjs/openpgpjs/blob/v6.1.0/src/packet/public_key.js">packet/public_key.js</a>, <a href="https://github.com/openpgpjs/openpgpjs/blob/v6.1.0/src/packet/public_key.js#L293">line 293</a>
 | |
|     </li></ul></dd>
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
|     <dt class="tag-see">See:</dt>
 | |
|     <dd class="tag-see">
 | |
|         <ul>
 | |
|             <li><a href="PublicKeyPacket.html#write">PublicKeyPacket#write</a></li>
 | |
|         </ul>
 | |
|     </dd>
 | |
|     
 | |
| 
 | |
|     
 | |
| </dl>
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
|         
 | |
|     
 | |
| 
 | |
|     
 | |
|         <h3 class="subsection-title">Methods</h3>
 | |
| 
 | |
|         
 | |
|             
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
|     <h4 class="name" id=".fromSecretKeyPacket"><span class="type-signature">(static) </span>fromSecretKeyPacket<span class="signature">(secretKeyPacket)</span><span class="type-signature"> → {<a href="PublicKeyPacket.html">PublicKeyPacket</a>}</span></h4>
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
| 
 | |
| 
 | |
| <div class="description">
 | |
|     <p>Create a PublicKeyPacket from a SecretKeyPacket</p>
 | |
| </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>secretKeyPacket</code></td>
 | |
|             
 | |
| 
 | |
|             <td class="type">
 | |
|             
 | |
|                 
 | |
| <span class="param-type"><a href="SecretKeyPacket.html">SecretKeyPacket</a></span>
 | |
| 
 | |
| 
 | |
|             
 | |
|             </td>
 | |
| 
 | |
|             
 | |
| 
 | |
|             
 | |
| 
 | |
|             <td class="description last"><p>key packet to convert</p></td>
 | |
|         </tr>
 | |
| 
 | |
|     
 | |
|     </tbody>
 | |
| </table>
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| <dl class="details">
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
|     <dt class="tag-source">Source:</dt>
 | |
|     <dd class="tag-source"><ul class="dummy"><li>
 | |
|         <a href="https://github.com/openpgpjs/openpgpjs/blob/v6.1.0/src/packet/public_key.js">packet/public_key.js</a>, <a href="https://github.com/openpgpjs/openpgpjs/blob/v6.1.0/src/packet/public_key.js#L89">line 89</a>
 | |
|     </li></ul></dd>
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| </dl>
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| <h5>Returns:</h5>
 | |
| 
 | |
|         
 | |
| <div class="param-desc">
 | |
|     <p>public key packet</p>
 | |
| </div>
 | |
| 
 | |
| 
 | |
| 
 | |
| <dl>
 | |
|     <dt>
 | |
|         Type
 | |
|     </dt>
 | |
|     <dd>
 | |
|         
 | |
| <span class="param-type"><a href="PublicKeyPacket.html">PublicKeyPacket</a></span>
 | |
| 
 | |
| 
 | |
|     </dd>
 | |
| </dl>
 | |
| 
 | |
|     
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
|         
 | |
|             
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
|     <h4 class="name" id="computeFingerprint"><span class="type-signature">(async) </span>computeFingerprint<span class="signature">()</span><span class="type-signature"></span></h4>
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
| 
 | |
| 
 | |
| <div class="description">
 | |
|     <p>Computes and set the fingerprint of the key</p>
 | |
| </div>
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| <dl class="details">
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
|     <dt class="tag-source">Source:</dt>
 | |
|     <dd class="tag-source"><ul class="dummy"><li>
 | |
|         <a href="https://github.com/openpgpjs/openpgpjs/blob/v6.1.0/src/packet/public_key.js">packet/public_key.js</a>, <a href="https://github.com/openpgpjs/openpgpjs/blob/v6.1.0/src/packet/public_key.js#L229">line 229</a>
 | |
|     </li></ul></dd>
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| </dl>
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
|         
 | |
|             
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
|     <h4 class="name" id="computeFingerprintAndKeyID"><span class="type-signature">(async) </span>computeFingerprintAndKeyID<span class="signature">()</span><span class="type-signature"></span></h4>
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
| 
 | |
| 
 | |
| <div class="description">
 | |
|     <p>Computes and set the key ID and fingerprint of the key</p>
 | |
| </div>
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| <dl class="details">
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
|     <dt class="tag-source">Source:</dt>
 | |
|     <dd class="tag-source"><ul class="dummy"><li>
 | |
|         <a href="https://github.com/openpgpjs/openpgpjs/blob/v6.1.0/src/packet/public_key.js">packet/public_key.js</a>, <a href="https://github.com/openpgpjs/openpgpjs/blob/v6.1.0/src/packet/public_key.js#L213">line 213</a>
 | |
|     </li></ul></dd>
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| </dl>
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
|         
 | |
|             
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
|     <h4 class="name" id="getAlgorithmInfo"><span class="type-signature"></span>getAlgorithmInfo<span class="signature">()</span><span class="type-signature"> → {Object}</span></h4>
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
| 
 | |
| 
 | |
| <div class="description">
 | |
|     <p>Returns algorithm information</p>
 | |
| </div>
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| <dl class="details">
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
|     <dt class="tag-source">Source:</dt>
 | |
|     <dd class="tag-source"><ul class="dummy"><li>
 | |
|         <a href="https://github.com/openpgpjs/openpgpjs/blob/v6.1.0/src/packet/public_key.js">packet/public_key.js</a>, <a href="https://github.com/openpgpjs/openpgpjs/blob/v6.1.0/src/packet/public_key.js#L269">line 269</a>
 | |
|     </li></ul></dd>
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| </dl>
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| <h5>Returns:</h5>
 | |
| 
 | |
|         
 | |
| <div class="param-desc">
 | |
|     <p>An object of the form {algorithm: String, bits:int, curve:String}.</p>
 | |
| </div>
 | |
| 
 | |
| 
 | |
| 
 | |
| <dl>
 | |
|     <dt>
 | |
|         Type
 | |
|     </dt>
 | |
|     <dd>
 | |
|         
 | |
| <span class="param-type">Object</span>
 | |
| 
 | |
| 
 | |
|     </dd>
 | |
| </dl>
 | |
| 
 | |
|     
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
|         
 | |
|             
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
|     <h4 class="name" id="getCreationTime"><span class="type-signature"></span>getCreationTime<span class="signature">()</span><span class="type-signature"> → {Date}</span></h4>
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
| 
 | |
| 
 | |
| <div class="description">
 | |
|     <p>Returns the creation time of the key</p>
 | |
| </div>
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| <dl class="details">
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
|     <dt class="tag-source">Source:</dt>
 | |
|     <dd class="tag-source"><ul class="dummy"><li>
 | |
|         <a href="https://github.com/openpgpjs/openpgpjs/blob/v6.1.0/src/packet/public_key.js">packet/public_key.js</a>, <a href="https://github.com/openpgpjs/openpgpjs/blob/v6.1.0/src/packet/public_key.js#L197">line 197</a>
 | |
|     </li></ul></dd>
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| </dl>
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| <h5>Returns:</h5>
 | |
| 
 | |
|         
 | |
| 
 | |
| 
 | |
| <dl>
 | |
|     <dt>
 | |
|         Type
 | |
|     </dt>
 | |
|     <dd>
 | |
|         
 | |
| <span class="param-type">Date</span>
 | |
| 
 | |
| 
 | |
|     </dd>
 | |
| </dl>
 | |
| 
 | |
|     
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
|         
 | |
|             
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
|     <h4 class="name" id="getFingerprint"><span class="type-signature"></span>getFingerprint<span class="signature">()</span><span class="type-signature"> → {String}</span></h4>
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
| 
 | |
| 
 | |
| <div class="description">
 | |
|     <p>Calculates and returns the fingerprint of the key, as a string</p>
 | |
| </div>
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| <dl class="details">
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
|     <dt class="tag-source">Source:</dt>
 | |
|     <dd class="tag-source"><ul class="dummy"><li>
 | |
|         <a href="https://github.com/openpgpjs/openpgpjs/blob/v6.1.0/src/packet/public_key.js">packet/public_key.js</a>, <a href="https://github.com/openpgpjs/openpgpjs/blob/v6.1.0/src/packet/public_key.js#L253">line 253</a>
 | |
|     </li></ul></dd>
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| </dl>
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| <h5>Returns:</h5>
 | |
| 
 | |
|         
 | |
| <div class="param-desc">
 | |
|     <p>A string containing the fingerprint in lowercase hex</p>
 | |
| </div>
 | |
| 
 | |
| 
 | |
| 
 | |
| <dl>
 | |
|     <dt>
 | |
|         Type
 | |
|     </dt>
 | |
|     <dd>
 | |
|         
 | |
| <span class="param-type">String</span>
 | |
| 
 | |
| 
 | |
|     </dd>
 | |
| </dl>
 | |
| 
 | |
|     
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
|         
 | |
|             
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
|     <h4 class="name" id="getFingerprintBytes"><span class="type-signature"></span>getFingerprintBytes<span class="signature">()</span><span class="type-signature"> → {Uint8Array}</span></h4>
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
| 
 | |
| 
 | |
| <div class="description">
 | |
|     <p>Returns the fingerprint of the key, as an array of bytes</p>
 | |
| </div>
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| <dl class="details">
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
|     <dt class="tag-source">Source:</dt>
 | |
|     <dd class="tag-source"><ul class="dummy"><li>
 | |
|         <a href="https://github.com/openpgpjs/openpgpjs/blob/v6.1.0/src/packet/public_key.js">packet/public_key.js</a>, <a href="https://github.com/openpgpjs/openpgpjs/blob/v6.1.0/src/packet/public_key.js#L245">line 245</a>
 | |
|     </li></ul></dd>
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| </dl>
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| <h5>Returns:</h5>
 | |
| 
 | |
|         
 | |
| <div class="param-desc">
 | |
|     <p>A Uint8Array containing the fingerprint</p>
 | |
| </div>
 | |
| 
 | |
| 
 | |
| 
 | |
| <dl>
 | |
|     <dt>
 | |
|         Type
 | |
|     </dt>
 | |
|     <dd>
 | |
|         
 | |
| <span class="param-type">Uint8Array</span>
 | |
| 
 | |
| 
 | |
|     </dd>
 | |
| </dl>
 | |
| 
 | |
|     
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
|         
 | |
|             
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
|     <h4 class="name" id="getKeyID"><span class="type-signature"></span>getKeyID<span class="signature">()</span><span class="type-signature"> → {<a href="module-type_keyid-KeyID.html">module:type/keyid~KeyID</a>}</span></h4>
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
| 
 | |
| 
 | |
| <div class="description">
 | |
|     <p>Return the key ID of the key</p>
 | |
| </div>
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| <dl class="details">
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
|     <dt class="tag-source">Source:</dt>
 | |
|     <dd class="tag-source"><ul class="dummy"><li>
 | |
|         <a href="https://github.com/openpgpjs/openpgpjs/blob/v6.1.0/src/packet/public_key.js">packet/public_key.js</a>, <a href="https://github.com/openpgpjs/openpgpjs/blob/v6.1.0/src/packet/public_key.js#L205">line 205</a>
 | |
|     </li></ul></dd>
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| </dl>
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| <h5>Returns:</h5>
 | |
| 
 | |
|         
 | |
| <div class="param-desc">
 | |
|     <p>The 8-byte key ID</p>
 | |
| </div>
 | |
| 
 | |
| 
 | |
| 
 | |
| <dl>
 | |
|     <dt>
 | |
|         Type
 | |
|     </dt>
 | |
|     <dd>
 | |
|         
 | |
| <span class="param-type"><a href="module-type_keyid-KeyID.html">module:type/keyid~KeyID</a></span>
 | |
| 
 | |
| 
 | |
|     </dd>
 | |
| </dl>
 | |
| 
 | |
|     
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
|         
 | |
|             
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
|     <h4 class="name" id="hasSameFingerprintAs"><span class="type-signature"></span>hasSameFingerprintAs<span class="signature">()</span><span class="type-signature"> → {Boolean}</span></h4>
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
| 
 | |
| 
 | |
| <div class="description">
 | |
|     <p>Calculates whether two keys have the same fingerprint without actually calculating the fingerprint</p>
 | |
| </div>
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| <dl class="details">
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
|     <dt class="tag-source">Source:</dt>
 | |
|     <dd class="tag-source"><ul class="dummy"><li>
 | |
|         <a href="https://github.com/openpgpjs/openpgpjs/blob/v6.1.0/src/packet/public_key.js">packet/public_key.js</a>, <a href="https://github.com/openpgpjs/openpgpjs/blob/v6.1.0/src/packet/public_key.js#L261">line 261</a>
 | |
|     </li></ul></dd>
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| </dl>
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| <h5>Returns:</h5>
 | |
| 
 | |
|         
 | |
| <div class="param-desc">
 | |
|     <p>Whether the two keys have the same version and public key data.</p>
 | |
| </div>
 | |
| 
 | |
| 
 | |
| 
 | |
| <dl>
 | |
|     <dt>
 | |
|         Type
 | |
|     </dt>
 | |
|     <dd>
 | |
|         
 | |
| <span class="param-type">Boolean</span>
 | |
| 
 | |
| 
 | |
|     </dd>
 | |
| </dl>
 | |
| 
 | |
|     
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
|         
 | |
|             
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
|     <h4 class="name" id="isDecrypted"><span class="type-signature"></span>isDecrypted<span class="signature">()</span><span class="type-signature"> → {Boolean|null}</span></h4>
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
| 
 | |
| 
 | |
| <div class="description">
 | |
|     <p>Check whether secret-key data is available in decrypted form. Returns null for public keys.</p>
 | |
| </div>
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| <dl class="details">
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
|     <dt class="tag-source">Source:</dt>
 | |
|     <dd class="tag-source"><ul class="dummy"><li>
 | |
|         <a href="https://github.com/openpgpjs/openpgpjs/blob/v6.1.0/src/packet/public_key.js">packet/public_key.js</a>, <a href="https://github.com/openpgpjs/openpgpjs/blob/v6.1.0/src/packet/public_key.js#L189">line 189</a>
 | |
|     </li></ul></dd>
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| </dl>
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| <h5>Returns:</h5>
 | |
| 
 | |
|         
 | |
| 
 | |
| 
 | |
| <dl>
 | |
|     <dt>
 | |
|         Type
 | |
|     </dt>
 | |
|     <dd>
 | |
|         
 | |
| <span class="param-type">Boolean</span>
 | |
| |
 | |
| 
 | |
| <span class="param-type">null</span>
 | |
| 
 | |
| 
 | |
|     </dd>
 | |
| </dl>
 | |
| 
 | |
|     
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
|         
 | |
|             
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
|     <h4 class="name" id="read"><span class="type-signature">(async) </span>read<span class="signature">(bytes)</span><span class="type-signature"> → {Object}</span></h4>
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
| 
 | |
| 
 | |
| <div class="description">
 | |
|     <p>Internal Parser for public keys as specified in <a href="https://tools.ietf.org/html/rfc4880#section-5.5.2">RFC 4880 section 5.5.2 Public-Key Packet Formats</a></p>
 | |
| </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>bytes</code></td>
 | |
|             
 | |
| 
 | |
|             <td class="type">
 | |
|             
 | |
|                 
 | |
| <span class="param-type">Uint8Array</span>
 | |
| 
 | |
| 
 | |
|             
 | |
|             </td>
 | |
| 
 | |
|             
 | |
| 
 | |
|             
 | |
| 
 | |
|             <td class="description last"><p>Input array to read the packet from</p></td>
 | |
|         </tr>
 | |
| 
 | |
|     
 | |
|     </tbody>
 | |
| </table>
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| <dl class="details">
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
|     <dt class="tag-source">Source:</dt>
 | |
|     <dd class="tag-source"><ul class="dummy"><li>
 | |
|         <a href="https://github.com/openpgpjs/openpgpjs/blob/v6.1.0/src/packet/public_key.js">packet/public_key.js</a>, <a href="https://github.com/openpgpjs/openpgpjs/blob/v6.1.0/src/packet/public_key.js#L107">line 107</a>
 | |
|     </li></ul></dd>
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| </dl>
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| <h5>Returns:</h5>
 | |
| 
 | |
|         
 | |
| <div class="param-desc">
 | |
|     <p>This object with attributes set by the parser</p>
 | |
| </div>
 | |
| 
 | |
| 
 | |
| 
 | |
| <dl>
 | |
|     <dt>
 | |
|         Type
 | |
|     </dt>
 | |
|     <dd>
 | |
|         
 | |
| <span class="param-type">Object</span>
 | |
| 
 | |
| 
 | |
|     </dd>
 | |
| </dl>
 | |
| 
 | |
|     
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
|         
 | |
|             
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
|     <h4 class="name" id="write"><span class="type-signature"></span>write<span class="signature">()</span><span class="type-signature"> → {Uint8Array}</span></h4>
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
| 
 | |
| 
 | |
| <div class="description">
 | |
|     <p>Creates an OpenPGP public key packet for the given key.</p>
 | |
| </div>
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| <dl class="details">
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
|     <dt class="tag-source">Source:</dt>
 | |
|     <dd class="tag-source"><ul class="dummy"><li>
 | |
|         <a href="https://github.com/openpgpjs/openpgpjs/blob/v6.1.0/src/packet/public_key.js">packet/public_key.js</a>, <a href="https://github.com/openpgpjs/openpgpjs/blob/v6.1.0/src/packet/public_key.js#L155">line 155</a>
 | |
|     </li></ul></dd>
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| </dl>
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| <h5>Returns:</h5>
 | |
| 
 | |
|         
 | |
| <div class="param-desc">
 | |
|     <p>Bytes encoding the public key OpenPGP packet.</p>
 | |
| </div>
 | |
| 
 | |
| 
 | |
| 
 | |
| <dl>
 | |
|     <dt>
 | |
|         Type
 | |
|     </dt>
 | |
|     <dd>
 | |
|         
 | |
| <span class="param-type">Uint8Array</span>
 | |
| 
 | |
| 
 | |
|     </dd>
 | |
| </dl>
 | |
| 
 | |
|     
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
|         
 | |
|             
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
|     <h4 class="name" id="writeForHash"><span class="type-signature"></span>writeForHash<span class="signature">(version)</span><span class="type-signature"></span></h4>
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
| 
 | |
| 
 | |
| <div class="description">
 | |
|     <p>Write packet in order to be hashed; either for a signature or a fingerprint</p>
 | |
| </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>version</code></td>
 | |
|             
 | |
| 
 | |
|             <td class="type">
 | |
|             
 | |
|                 
 | |
| <span class="param-type">Integer</span>
 | |
| 
 | |
| 
 | |
|             
 | |
|             </td>
 | |
| 
 | |
|             
 | |
| 
 | |
|             
 | |
| 
 | |
|             <td class="description last"><p>target version of signature or key</p></td>
 | |
|         </tr>
 | |
| 
 | |
|     
 | |
|     </tbody>
 | |
| </table>
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| <dl class="details">
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
|     <dt class="tag-source">Source:</dt>
 | |
|     <dd class="tag-source"><ul class="dummy"><li>
 | |
|         <a href="https://github.com/openpgpjs/openpgpjs/blob/v6.1.0/src/packet/public_key.js">packet/public_key.js</a>, <a href="https://github.com/openpgpjs/openpgpjs/blob/v6.1.0/src/packet/public_key.js#L177">line 177</a>
 | |
|     </li></ul></dd>
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| </dl>
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
|         
 | |
|     
 | |
| 
 | |
|     
 | |
| 
 | |
|     
 | |
| </article>
 | |
| 
 | |
| </section>
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| </div>
 | |
| 
 | |
| <nav>
 | |
|     <h2><a href="index.html">Home</a></h2><h3>Functions</h3><ul><li><a href="global.html#armor">armor</a></li><li><a href="global.html#createCleartextMessage">createCleartextMessage</a></li><li><a href="global.html#createKey">createKey</a></li><li><a href="global.html#createMessage">createMessage</a></li><li><a href="global.html#decrypt">decrypt</a></li><li><a href="global.html#decryptKey">decryptKey</a></li><li><a href="global.html#decryptSessionKeys">decryptSessionKeys</a></li><li><a href="global.html#encrypt">encrypt</a></li><li><a href="global.html#encryptKey">encryptKey</a></li><li><a href="global.html#encryptSessionKey">encryptSessionKey</a></li><li><a href="global.html#formatObject">formatObject</a></li><li><a href="global.html#generateKey">generateKey</a></li><li><a href="global.html#generateSessionKey">generateSessionKey</a></li><li><a href="global.html#getCipherBlockSize">getCipherBlockSize</a></li><li><a href="global.html#getCipherKeySize">getCipherKeySize</a></li><li><a href="global.html#getCipherParams">getCipherParams</a></li><li><a href="global.html#getCompressionStreamInstantiators">getCompressionStreamInstantiators</a></li><li><a href="global.html#newPacketFromTag">newPacketFromTag</a></li><li><a href="global.html#newS2KFromConfig">newS2KFromConfig</a></li><li><a href="global.html#newS2KFromType">newS2KFromType</a></li><li><a href="global.html#produceEncryptionKey">produceEncryptionKey</a></li><li><a href="global.html#readCleartextMessage">readCleartextMessage</a></li><li><a href="global.html#readKey">readKey</a></li><li><a href="global.html#readKeys">readKeys</a></li><li><a href="global.html#readMessage">readMessage</a></li><li><a href="global.html#readPrivateKey">readPrivateKey</a></li><li><a href="global.html#readPrivateKeys">readPrivateKeys</a></li><li><a href="global.html#readSignature">readSignature</a></li><li><a href="global.html#reformatKey">reformatKey</a></li><li><a href="global.html#revokeKey">revokeKey</a></li><li><a href="global.html#runAEAD">runAEAD</a></li><li><a href="global.html#sign">sign</a></li><li><a href="global.html#unarmor">unarmor</a></li><li><a href="global.html#verify">verify</a></li><li><a href="global.html#wrapKeyObject">wrapKeyObject</a></li><li><a href="global.html#zlib">zlib</a></li></ul><h3>Modules</h3><ul><li><a href="module-config.html">config</a></li><li><a href="module-crypto.html">crypto</a></li><li><a href="module-crypto_aes_kw.html">crypto/aes_kw</a></li><li><a href="module-crypto_cipherMode.html">crypto/cipherMode</a></li><li><a href="module-crypto_cmac.html">crypto/cmac</a></li><li><a href="module-crypto_crypto.html">crypto/crypto</a></li><li><a href="module-crypto_hash.html">crypto/hash</a></li><li><a href="module-crypto_hkdf.html">crypto/hkdf</a></li><li><a href="module-crypto_mode_cfb.html">crypto/mode/cfb</a></li><li><a href="module-crypto_mode_eax.html">crypto/mode/eax</a></li><li><a href="module-crypto_mode_gcm.html">crypto/mode/gcm</a></li><li><a href="module-crypto_mode_ocb.html">crypto/mode/ocb</a></li><li><a href="module-crypto_pkcs1.html">crypto/pkcs1</a></li><li><a href="module-crypto_public_key.html">crypto/public_key</a></li><li><a href="module-crypto_public_key_dsa.html">crypto/public_key/dsa</a></li><li><a href="module-crypto_public_key_elgamal.html">crypto/public_key/elgamal</a></li><li><a href="module-crypto_public_key_elliptic.html">crypto/public_key/elliptic</a></li><li><a href="module-crypto_public_key_elliptic_curve.html">crypto/public_key/elliptic/curve</a></li><li><a href="module-crypto_public_key_elliptic_ecdh.html">crypto/public_key/elliptic/ecdh</a></li><li><a href="module-crypto_public_key_elliptic_ecdsa.html">crypto/public_key/elliptic/ecdsa</a></li><li><a href="module-crypto_public_key_elliptic_eddsa.html">crypto/public_key/elliptic/eddsa</a></li><li><a href="module-crypto_public_key_elliptic_eddsa_legacy.html">crypto/public_key/elliptic/eddsa_legacy</a></li><li><a href="module-crypto_public_key_rsa.html">crypto/public_key/rsa</a></li><li><a href="module-crypto_random.html">crypto/random</a></li><li><a href="module-crypto_signature.html">crypto/signature</a></li><li><a href="module-encoding_base64.html">encoding/base64</a></li><li><a href="module-enums.html">enums</a></li><li><a href="module-key_helper.html">key/helper</a></li><li><a href="module-key_Subkey.html">key/Subkey</a></li><li><a href="module-key_User.html">key/User</a></li><li><a href="module-packet_packet.html">packet/packet</a></li><li><a href="module-type_ecdh_symkey.html">type/ecdh_symkey</a></li><li><a href="module-type_keyid.html">type/keyid</a></li><li><a href="module-type_oid.html">type/oid</a></li><li><a href="module-type_s2k.html">type/s2k</a></li><li><a href="module-type_x25519x448_symkey.html">type/x25519x448_symkey</a></li><li><a href="module-util.html">util</a></li></ul><h3>Classes</h3><ul><li><a href="AEADEncryptedDataPacket.html">AEADEncryptedDataPacket</a></li><li><a href="Argon2S2K.html">Argon2S2K</a></li><li><a href="CleartextMessage.html">CleartextMessage</a></li><li><a href="CompressedDataPacket.html">CompressedDataPacket</a></li><li><a href="Key.html">Key</a></li><li><a href="LiteralDataPacket.html">LiteralDataPacket</a></li><li><a href="MarkerPacket.html">MarkerPacket</a></li><li><a href="Message.html">Message</a></li><li><a href="module-key_Subkey-Subkey.html">Subkey</a></li><li><a href="module-key_User-User.html">User</a></li><li><a href="module-type_kdf_params-KDFParams.html">KDFParams</a></li><li><a href="module-type_keyid-KeyID.html">KeyID</a></li><li><a href="module-type_s2k-GenericS2K.html">GenericS2K</a></li><li><a href="OnePassSignaturePacket.html">OnePassSignaturePacket</a></li><li><a href="PacketList.html">PacketList</a></li><li><a href="PaddingPacket.html">PaddingPacket</a></li><li><a href="PrivateKey.html">PrivateKey</a></li><li><a href="PublicKey.html">PublicKey</a></li><li><a href="PublicKeyEncryptedSessionKeyPacket.html">PublicKeyEncryptedSessionKeyPacket</a></li><li><a href="PublicKeyPacket.html">PublicKeyPacket</a></li><li><a href="PublicSubkeyPacket.html">PublicSubkeyPacket</a></li><li><a href="SecretKeyPacket.html">SecretKeyPacket</a></li><li><a href="SecretSubkeyPacket.html">SecretSubkeyPacket</a></li><li><a href="Signature.html">Signature</a></li><li><a href="SignaturePacket.html">SignaturePacket</a></li><li><a href="SymEncryptedIntegrityProtectedDataPacket.html">SymEncryptedIntegrityProtectedDataPacket</a></li><li><a href="SymEncryptedSessionKeyPacket.html">SymEncryptedSessionKeyPacket</a></li><li><a href="SymmetricallyEncryptedDataPacket.html">SymmetricallyEncryptedDataPacket</a></li><li><a href="TrustPacket.html">TrustPacket</a></li><li><a href="UserAttributePacket.html">UserAttributePacket</a></li><li><a href="UserIDPacket.html">UserIDPacket</a></li></ul>
 | |
| </nav>
 | |
| 
 | |
| <br class="clear">
 | |
| 
 | |
| <footer>
 | |
|     Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.11</a>
 | |
| </footer>
 | |
| 
 | |
| <script> prettyPrint(); </script>
 | |
| <script src="scripts/linenumber.js"> </script>
 | |
| </body>
 | |
| </html> | 
