tink-crypto
Version:
A multi-language, cross-platform library that provides cryptographic APIs that are secure, easy to use correctly, and hard(er) to misuse.
32 lines (31 loc) • 996 B
TypeScript
/**
* @license
* Copyright 2020 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
import { PublicKeyVerify } from '../signature/internal/public_key_verify';
import * as EllipticCurves from './elliptic_curves';
/**
* Implementation of ECDSA verifying.
*
* @final
*/
export declare class EcdsaVerify extends PublicKeyVerify {
private readonly key;
private readonly hash;
private readonly encoding;
private readonly ieeeSignatureLength;
/**
* @param encoding The
* encoding of the signature.
*/
constructor(key: CryptoKey, hash: string, encoding: EllipticCurves.EcdsaSignatureEncodingType);
/**
*/
verify(signature: Uint8Array, message: Uint8Array): Promise<boolean>;
}
/**
* @param opt_encoding The
* optional encoding of the signature. If absent, default is IEEE P1363.
*/
export declare function fromJsonWebKey(jwk: JsonWebKey, hash: string, encoding?: EllipticCurves.EcdsaSignatureEncodingType): Promise<PublicKeyVerify>;