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.
18 lines (17 loc) • 1.03 kB
TypeScript
/**
* @license
* Copyright 2020 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
import { PbEcdsaKeyFormat, PbEcdsaParams, PbEcdsaPrivateKey, PbEcdsaPublicKey, PbEcdsaSignatureEncoding as PbEcdsaSignatureEncodingType } from '../internal/proto';
import * as EllipticCurves from '../subtle/elliptic_curves';
export declare function validateKeyFormat(keyFormat: PbEcdsaKeyFormat): void;
export declare function validatePrivateKey(key: PbEcdsaPrivateKey, privateKeyManagerVersion: number, publicKeyManagerVersion: number): void;
export declare function validatePublicKey(key: PbEcdsaPublicKey, publicKeyManagerVersion: number): void;
export declare function validateParams(params: PbEcdsaParams): void;
export declare function encodingTypeProtoToEnum(encodingTypeProto: PbEcdsaSignatureEncodingType): EllipticCurves.EcdsaSignatureEncodingType;
/**
* WARNING: This method assumes that the given key proto is valid.
*
*/
export declare function getJsonWebKeyFromProto(key: PbEcdsaPrivateKey | PbEcdsaPublicKey): JsonWebKey;