ecash-lib
Version:
Library for eCash transaction building
25 lines • 1.04 kB
TypeScript
/** Algorithm instance for public key cryptography */
export declare class PkcAlgo {
algoOid: string;
params: string | undefined;
private constructor();
/**
* Return a PkcAlgo instance for the given algorithm OID and
* elliptic curve params (undefined for RSA).
* Throw an exception if the given algo is not supported, otherwise do nothing.
*/
static fromOid(algoOid: string, params?: string): PkcAlgo;
/**
* Verify a signature for the given cryptographic algorithm.
* Intended to be used in X509 certificate verification.
* Throw an exception if the algorithm is not supported.
*/
verify(sig: Uint8Array, msg: Uint8Array, pk: Uint8Array): void;
}
interface EcashLibPkc {
verify?: (algoOid: string, params: string | undefined, sig: Uint8Array, msg: Uint8Array, pk: Uint8Array) => void;
algoSupported?: (algoOid: string, params?: string) => void;
}
export declare function __setPkc(pkc: EcashLibPkc): void;
export {};
//# sourceMappingURL=publicKeyCrypto.d.ts.map