node-jose
node-jose copied to clipboard
Can this package convert a Uint8Array to JWK object
Is it possible for a Uint8Array to be set with the structure of a JWK object using this library in browser
Input:
Uint8Array(32) [16, 242, 193, 235, 85, 252, 66, 94, 118, 129, 203, 86, 48, 212, 115, 194, 174, 233, 55, 141, 48, 208, 236, 48, 85, 16, 161, 166, 145, 172, 53, 82]
produce output like:
KCVXrFs8oJBheco-JxbHkPL9bxyN5\WZ68hyfVgrBuJg
The whole expected output is something like
{
”alg”:”A256GCM”,
”ext”:false,
”k”:”KCVXrFs8oJBheco-JxbHkPL9bxyN5\WZ68hyfVgrBuJg”,
”key_ops”:[”encrypt”,”decrypt”],
”kty”:”oct”,
”kid”:”mp”
}
All the fields are not necessary.