UNPKG

cose-kit

Version:

**DEPRECATED:** Use [@auth0/cose](https://www.npmjs.com/package/@auth0/cose).

39 lines (38 loc) 1.44 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.JWKKeyOpsToCOSE = exports.JWKKeyOps = exports.KeyOps = void 0; var KeyOps; (function (KeyOps) { KeyOps[KeyOps["Sign"] = 1] = "Sign"; KeyOps[KeyOps["Verify"] = 2] = "Verify"; KeyOps[KeyOps["Encrypt"] = 3] = "Encrypt"; KeyOps[KeyOps["Decrypt"] = 4] = "Decrypt"; KeyOps[KeyOps["WrapKey"] = 5] = "WrapKey"; KeyOps[KeyOps["UnwrapKey"] = 6] = "UnwrapKey"; KeyOps[KeyOps["DeriveKey"] = 7] = "DeriveKey"; KeyOps[KeyOps["DeriveBits"] = 8] = "DeriveBits"; KeyOps[KeyOps["MACCreate"] = 9] = "MACCreate"; KeyOps[KeyOps["MACVerify"] = 10] = "MACVerify"; })(KeyOps || (exports.KeyOps = KeyOps = {})); exports.JWKKeyOps = new Map([ [KeyOps.Sign, 'sign'], [KeyOps.Verify, 'verify'], [KeyOps.Encrypt, 'encrypt'], [KeyOps.Decrypt, 'decrypt'], [KeyOps.WrapKey, 'wrapKey'], [KeyOps.UnwrapKey, 'unwrapKey'], [KeyOps.DeriveKey, 'deriveKey'], [KeyOps.DeriveBits, 'deriveBits'], [KeyOps.MACCreate, 'sign'], [KeyOps.MACVerify, 'verify'] ]); exports.JWKKeyOpsToCOSE = new Map([ ['sign', [KeyOps.Sign, KeyOps.MACCreate]], ['verify', [KeyOps.Verify, KeyOps.MACVerify]], ['encrypt', [KeyOps.Encrypt]], ['decrypt', [KeyOps.Decrypt]], ['wrapKey', [KeyOps.WrapKey]], ['unwrapKey', [KeyOps.UnwrapKey]], ['deriveKey', [KeyOps.DeriveKey]], ['deriveBits', [KeyOps.DeriveBits]], ]);