@@ -18,21 +18,21 @@ export function readPrivateKey(options: { armoredKey: string, config?: PartialCo
1818export function readPrivateKey ( options : { binaryKey : Uint8Array , config ?: PartialConfig } ) : Promise < PrivateKey > ;
1919export function readPrivateKeys ( options : { armoredKeys : string , config ?: PartialConfig } ) : Promise < PrivateKey [ ] > ;
2020export function readPrivateKeys ( options : { binaryKeys : Uint8Array , config ?: PartialConfig } ) : Promise < PrivateKey [ ] > ;
21- export function generateKey ( options : KeyOptions & { format ?: 'armor ' } ) : Promise < SerializedKeyPair < string > & { revocationCertificate : string } > ;
21+ export function generateKey ( options : KeyOptions & { format ?: 'armored ' } ) : Promise < SerializedKeyPair < string > & { revocationCertificate : string } > ;
2222export function generateKey ( options : KeyOptions & { format : 'binary' } ) : Promise < SerializedKeyPair < Uint8Array > & { revocationCertificate : string } > ;
2323export function generateKey ( options : KeyOptions & { format : 'object' } ) : Promise < KeyPair & { revocationCertificate : string } > ;
2424export function decryptKey ( options : { privateKey : PrivateKey ; passphrase ?: MaybeArray < string > ; config ?: PartialConfig } ) : Promise < PrivateKey > ;
2525export function encryptKey ( options : { privateKey : PrivateKey ; passphrase ?: MaybeArray < string > ; config ?: PartialConfig } ) : Promise < PrivateKey > ;
26- export function reformatKey ( options : { privateKey : PrivateKey ; userIDs ?: MaybeArray < UserID > ; passphrase ?: string ; keyExpirationTime ?: number ; date ?: Date , format ?: 'armor ' , config ?: PartialConfig } ) : Promise < SerializedKeyPair < string > & { revocationCertificate : string } > ;
26+ export function reformatKey ( options : { privateKey : PrivateKey ; userIDs ?: MaybeArray < UserID > ; passphrase ?: string ; keyExpirationTime ?: number ; date ?: Date , format ?: 'armored ' , config ?: PartialConfig } ) : Promise < SerializedKeyPair < string > & { revocationCertificate : string } > ;
2727export function reformatKey ( options : { privateKey : PrivateKey ; userIDs ?: MaybeArray < UserID > ; passphrase ?: string ; keyExpirationTime ?: number ; date ?: Date , format : 'binary' , config ?: PartialConfig } ) : Promise < SerializedKeyPair < Uint8Array > & { revocationCertificate : string } > ;
2828export function reformatKey ( options : { privateKey : PrivateKey ; userIDs ?: MaybeArray < UserID > ; passphrase ?: string ; keyExpirationTime ?: number ; date ?: Date , format : 'object' , config ?: PartialConfig } ) : Promise < KeyPair & { revocationCertificate : string } > ;
29- export function revokeKey ( options : { key : PrivateKey , reasonForRevocation ?: ReasonForRevocation , date ?: Date , format ?: 'armor ' , config ?: PartialConfig } ) : Promise < SerializedKeyPair < string > > ;
29+ export function revokeKey ( options : { key : PrivateKey , reasonForRevocation ?: ReasonForRevocation , date ?: Date , format ?: 'armored ' , config ?: PartialConfig } ) : Promise < SerializedKeyPair < string > > ;
3030export function revokeKey ( options : { key : PrivateKey , reasonForRevocation ?: ReasonForRevocation , date ?: Date , format : 'binary' , config ?: PartialConfig } ) : Promise < SerializedKeyPair < Uint8Array > > ;
3131export function revokeKey ( options : { key : PrivateKey , reasonForRevocation ?: ReasonForRevocation , date ?: Date , format : 'object' , config ?: PartialConfig } ) : Promise < KeyPair > ;
32- export function revokeKey ( options : { key : PrivateKey , revocationCertificate : string , date ?: Date , format ?: 'armor ' , config ?: PartialConfig } ) : Promise < SerializedKeyPair < string > > ;
32+ export function revokeKey ( options : { key : PrivateKey , revocationCertificate : string , date ?: Date , format ?: 'armored ' , config ?: PartialConfig } ) : Promise < SerializedKeyPair < string > > ;
3333export function revokeKey ( options : { key : PrivateKey , revocationCertificate : string , date ?: Date , format : 'binary' , config ?: PartialConfig } ) : Promise < SerializedKeyPair < Uint8Array > > ;
3434export function revokeKey ( options : { key : PrivateKey , revocationCertificate : string , date ?: Date , format : 'object' , config ?: PartialConfig } ) : Promise < KeyPair > ;
35- export function revokeKey ( options : { key : PublicKey , revocationCertificate : string , date ?: Date , format ?: 'armor ' , config ?: PartialConfig } ) : Promise < { publicKey : string , privateKey : null } > ;
35+ export function revokeKey ( options : { key : PublicKey , revocationCertificate : string , date ?: Date , format ?: 'armored ' , config ?: PartialConfig } ) : Promise < { publicKey : string , privateKey : null } > ;
3636export function revokeKey ( options : { key : PublicKey , revocationCertificate : string , date ?: Date , format : 'binary' , config ?: PartialConfig } ) : Promise < { publicKey : Uint8Array , privateKey : null } > ;
3737export function revokeKey ( options : { key : PublicKey , revocationCertificate : string , date ?: Date , format : 'object' , config ?: PartialConfig } ) : Promise < { publicKey : PublicKey , privateKey : null } > ;
3838
@@ -172,7 +172,7 @@ export class CleartextMessage {
172172/* ############## v5 MSG #################### */
173173export function generateSessionKey ( options : { encryptionKeys : MaybeArray < PublicKey > , date ?: Date , encryptionUserIDs ?: MaybeArray < UserID > , config ?: PartialConfig } ) : Promise < SessionKey > ;
174174export function encryptSessionKey ( options : SessionKey & {
175- encryptionKeys ?: MaybeArray < PublicKey > , passwords ?: MaybeArray < string > , format ?: 'armor ' , wildcard ?: boolean , encryptionKeyIDs ?: MaybeArray < KeyID > , date ?: Date , encryptionUserIDs ?: MaybeArray < UserID > , config ?: PartialConfig
175+ encryptionKeys ?: MaybeArray < PublicKey > , passwords ?: MaybeArray < string > , format ?: 'armored ' , wildcard ?: boolean , encryptionKeyIDs ?: MaybeArray < KeyID > , date ?: Date , encryptionUserIDs ?: MaybeArray < UserID > , config ?: PartialConfig
176176} ) : Promise < string > ;
177177export function encryptSessionKey ( options : SessionKey & {
178178 encryptionKeys ?: MaybeArray < PublicKey > , passwords ?: MaybeArray < string > , format : 'binary' , wildcard ?: boolean , encryptionKeyIDs ?: MaybeArray < KeyID > , date ?: Date , encryptionUserIDs ?: MaybeArray < UserID > , config ?: PartialConfig
@@ -188,7 +188,7 @@ export function readMessage<T extends MaybeStream<Uint8Array>>(options: { binary
188188export function createMessage < T extends MaybeStream < string > > ( options : { text : T , filename ?: string , date ?: Date , type ?: DataPacketType } ) : Promise < Message < T > > ;
189189export function createMessage < T extends MaybeStream < Uint8Array > > ( options : { binary : T , filename ?: string , date ?: Date , type ?: DataPacketType } ) : Promise < Message < T > > ;
190190
191- export function encrypt < T extends MaybeStream < Data > > ( options : EncryptOptions & { message : Message < T > , format ?: 'armor ' } ) : Promise <
191+ export function encrypt < T extends MaybeStream < Data > > ( options : EncryptOptions & { message : Message < T > , format ?: 'armored ' } ) : Promise <
192192 T extends WebStream < infer X > ? WebStream < string > :
193193 T extends NodeStream < infer X > ? NodeStream < string > :
194194 string
@@ -200,7 +200,7 @@ export function encrypt<T extends MaybeStream<Data>>(options: EncryptOptions & {
200200> ;
201201export function encrypt < T extends MaybeStream < Data > > ( options : EncryptOptions & { message : Message < T > , format : 'object' } ) : Promise < Message < T > > ;
202202
203- export function sign < T extends MaybeStream < Data > > ( options : SignOptions & { message : Message < T > , format ?: 'armor ' } ) : Promise <
203+ export function sign < T extends MaybeStream < Data > > ( options : SignOptions & { message : Message < T > , format ?: 'armored ' } ) : Promise <
204204 T extends WebStream < infer X > ? WebStream < string > :
205205 T extends NodeStream < infer X > ? NodeStream < string > :
206206 string
@@ -211,7 +211,7 @@ export function sign<T extends MaybeStream<Data>>(options: SignOptions & { messa
211211 Uint8Array
212212> ;
213213export function sign < T extends MaybeStream < Data > > ( options : SignOptions & { message : Message < T > , format : 'object' } ) : Promise < Message < T > > ;
214- export function sign ( options : SignOptions & { message : CleartextMessage , format ?: 'armor ' } ) : Promise < string > ;
214+ export function sign ( options : SignOptions & { message : CleartextMessage , format ?: 'armored ' } ) : Promise < string > ;
215215export function sign ( options : SignOptions & { message : CleartextMessage , format : 'object' } ) : Promise < CleartextMessage > ;
216216
217217export function decrypt < T extends MaybeStream < Data > > ( options : DecryptOptions & { message : Message < T > , format : 'binary' } ) : Promise < DecryptMessageResult & {
@@ -583,7 +583,7 @@ interface EncryptOptions {
583583 /** (optional) session key */
584584 sessionKey ?: SessionKey ;
585585 /** if the return values should be ascii armored or the message/signature objects */
586- format ?: 'armor ' | 'binary' | 'object' ;
586+ format ?: 'armored ' | 'binary' | 'object' ;
587587 /** (optional) if the signature should be detached (if true, signature will be added to returned object) */
588588 signature ?: Signature ;
589589 /** (optional) encrypt as of a certain date */
@@ -626,7 +626,7 @@ interface DecryptOptions {
626626interface SignOptions {
627627 message : CleartextMessage | Message < MaybeStream < Data > > ;
628628 signingKeys ?: MaybeArray < PrivateKey > ;
629- format ?: 'armor ' | 'binary' | 'object' ;
629+ format ?: 'armored ' | 'binary' | 'object' ;
630630 dataType ?: DataPacketType ;
631631 detached ?: boolean ;
632632 signingKeyIDs ?: MaybeArray < KeyID > ;
@@ -672,7 +672,7 @@ interface KeyOptions {
672672 keyExpirationTime ?: number ;
673673 date ?: Date ;
674674 subkeys ?: SubkeyOptions [ ] ;
675- format ?: 'armor ' | 'object' | 'binary' ;
675+ format ?: 'armored ' | 'object' | 'binary' ;
676676 config ?: PartialConfig ;
677677}
678678
0 commit comments