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.
31 lines (30 loc) • 990 B
TypeScript
/**
* @license
* Copyright 2020 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
import { PublicKeySign } from '../signature/internal/public_key_sign';
import * as EllipticCurves from './elliptic_curves';
/**
* Implementation of ECDSA signing.
*
* @final
*/
export declare class EcdsaSign extends PublicKeySign {
private readonly key;
private readonly hash;
private readonly encoding;
/**
* @param opt_encoding The
* optional encoding of the signature. If absent, default is IEEE P1363.
*/
constructor(key: CryptoKey, hash: string, opt_encoding?: EllipticCurves.EcdsaSignatureEncodingType | null);
/**
*/
sign(message: Uint8Array): Promise<Uint8Array>;
}
/**
* @param opt_encoding The
* optional encoding of the signature. If absent, default is IEEE P1363.
*/
export declare function fromJsonWebKey(jwk: JsonWebKey, hash: string, opt_encoding?: EllipticCurves.EcdsaSignatureEncodingType | null): Promise<PublicKeySign>;