PeculiarVentures/webcrypto

exportkey returns octet instead of oct

beejones opened this issue · 1 comments

Hi,

I am trying to migrate my code from node-webcrypto-ossl to webcrypto.
I have a problem that exportkey of an hmac key returns octet instead of oct as kty.

This is my flow:
key generation
let key = await this._crypto.subtle.generateKey(
{ hash:"SHA-256", name:"hmac"},
true,
["sign"]
);

exportkey
const jwk = await this._crypto.subtle.exportKey(
'jwk',
key);

results in:
{
alg:"HS256"
ext:true
k:"ji4zeVsT2I7ZkzKomSTSSXxaj7cq33U5mbs2SMrdAsA"
key_ops: ["sign"]
kty:"octet"
}
Can you change kty to oct as it should be?
Thanks

+ @peculiar/webcrypto@1.0.10

@beejones Thank you