Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/openpgpjs/openpgpjs.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIvan Pizhenko <11859904+IvanPizhenko@users.noreply.github.com>2022-02-18 22:20:50 +0300
committerGitHub <noreply@github.com>2022-02-18 22:20:50 +0300
commite5c7c77362ba0d9e01f0faae0f5a00d564b1624d (patch)
tree64e231468a540911dd93b9b55063230fe095616a
parentf93f59e2e5542a8610b59f49a5d9f90de8839b75 (diff)
TypeScript: fix `data` argument type in `SignaturePacket.verify()` (#1494)
-rw-r--r--openpgp.d.ts2
-rw-r--r--src/packet/signature.js2
2 files changed, 2 insertions, 2 deletions
diff --git a/openpgp.d.ts b/openpgp.d.ts
index 4f725860..911a78fc 100644
--- a/openpgp.d.ts
+++ b/openpgp.d.ts
@@ -522,7 +522,7 @@ export class SignaturePacket extends BasePacket {
public preferredAEADAlgorithms: enums.aead[] | null;
public revoked: null | boolean;
public sign(key: AnySecretKeyPacket, data: Uint8Array, date?: Date, detached?: boolean): Promise<void>;
- public verify(key: AnyKeyPacket, signatureType: enums.signature, data: Uint8Array, date?: Date, detached?: boolean, config?: Config): Promise<void>; // throws on error
+ public verify(key: AnyKeyPacket, signatureType: enums.signature, data: Uint8Array | object, date?: Date, detached?: boolean, config?: Config): Promise<void>; // throws on error
public isExpired(date?: Date): boolean;
public getExpirationTime(): Date | typeof Infinity;
}
diff --git a/src/packet/signature.js b/src/packet/signature.js
index d0b01d0a..4d56d6e9 100644
--- a/src/packet/signature.js
+++ b/src/packet/signature.js
@@ -652,7 +652,7 @@ class SignaturePacket {
* @param {PublicSubkeyPacket|PublicKeyPacket|
* SecretSubkeyPacket|SecretKeyPacket} key - the public key to verify the signature
* @param {module:enums.signature} signatureType - Expected signature type
- * @param {String|Object} data - Data which on the signature applies
+ * @param {Uint8Array|Object} data - Data which on the signature applies
* @param {Date} [date] - Use the given date instead of the current time to check for signature validity and expiration
* @param {Boolean} [detached] - Whether to verify a detached signature
* @param {Object} [config] - Full configuration, defaults to openpgp.config