UNPKG

773 BJavaScriptView Raw
1module.exports.KEYOBJECT = Symbol('KEYOBJECT')
2module.exports.PRIVATE_MEMBERS = Symbol('PRIVATE_MEMBERS')
3module.exports.PUBLIC_MEMBERS = Symbol('PUBLIC_MEMBERS')
4module.exports.THUMBPRINT_MATERIAL = Symbol('THUMBPRINT_MATERIAL')
5module.exports.JWK_MEMBERS = Symbol('JWK_MEMBERS')
6module.exports.KEY_MANAGEMENT_ENCRYPT = Symbol('KEY_MANAGEMENT_ENCRYPT')
7module.exports.KEY_MANAGEMENT_DECRYPT = Symbol('KEY_MANAGEMENT_DECRYPT')
8
9const USES_MAPPING = {
10 sig: new Set(['sign', 'verify']),
11 enc: new Set(['encrypt', 'decrypt', 'wrapKey', 'unwrapKey', 'deriveKey'])
12}
13const OPS = new Set([...USES_MAPPING.sig, ...USES_MAPPING.enc])
14const USES = new Set(Object.keys(USES_MAPPING))
15
16module.exports.USES_MAPPING = USES_MAPPING
17module.exports.OPS = OPS
18module.exports.USES = USES