UNPKG

@unvision/jose

Version:

Implementation of the RFCs of the JOSE Working Group.

38 lines 1.37 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.none = void 0; const jsonwebsignature_algorithm_1 = require("./jsonwebsignature.algorithm"); /** * Implementation of the JSON Web Signature **none** Algorithm. */ class NoneAlgorithm extends jsonwebsignature_algorithm_1.JsonWebSignatureAlgorithm { /** * Instantiates a new JSON Web Signature **none** Algorithm to Sign and Verify Messages. */ constructor() { super('none'); } /** * Signs a Message with the provided JSON Web Key. * * @param _message Message to be Signed. * @returns Resulting Signature of the provided Message. */ // eslint-disable-next-line @typescript-eslint/no-unused-vars async sign(_message) { return Buffer.alloc(0); } /** * 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. */ // eslint-disable-next-line @typescript-eslint/no-unused-vars, @typescript-eslint/no-empty-function async verify(_signature, _message) { } } /** * No digital signature or MAC performed. */ exports.none = new NoneAlgorithm(); //# sourceMappingURL=none.algorithm.js.map