UNPKG

@guarani/jose

Version:

Implementation of the RFCs of the JOSE Working Group.

37 lines (36 loc) 1.21 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.none = void 0; /* eslint-disable @typescript-eslint/no-unused-vars */ 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 the Messages. */ constructor() { super(null, 'none'); } /** * Signs a Message with the provided JSON Web Key. * * @param message Message to be Signed. * @returns Resulting Signature of the provided Message. */ 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. */ async verify(signature, message) { } } /** * No digital signature or MAC performed. */ exports.none = new NoneAlgorithm();