UNPKG

@unvision/jose

Version:

Implementation of the RFCs of the JOSE Working Group.

31 lines (30 loc) 1.05 kB
/// <reference types="node" /> import { JsonWebSignatureAlgorithm } from './jsonwebsignature.algorithm'; /** * Implementation of the JSON Web Signature **none** Algorithm. */ declare class NoneAlgorithm extends JsonWebSignatureAlgorithm { /** * Instantiates a new JSON Web Signature **none** Algorithm to Sign and Verify Messages. */ constructor(); /** * Signs a Message with the provided JSON Web Key. * * @param _message Message to be Signed. * @returns Resulting Signature of the provided Message. */ sign(_message: Buffer): Promise<Buffer>; /** * Checks if the provided Signature matches the provided Message based on the provide JSON Web Key. * * @param _signature Signature to be matched against the provided Message. * @param _message Message to be matched against the provided Signature. */ verify(_signature: Buffer, _message: Buffer): Promise<void>; } /** * No digital signature or MAC performed. */ export declare const none: NoneAlgorithm; export {};