Closed LinusU closed 6 years ago
Seems like the length property is being read from the data, but that property only exists on typed arrays.
length
data
https://github.com/anvilresearch/webcrypto/blob/07129425f5d46f8e65f9f8c9732ad31abdc21537/src/algorithms/AES-GCM.js#L63
https://github.com/anvilresearch/webcrypto/blob/07129425f5d46f8e65f9f8c9732ad31abdc21537/src/algorithms/AES-GCM.js#L68-L71
I think that the proper approach is to read the byteLength
byteLength
Ah yes, slipped through the cracks when completing W3C outline It is an exclusive check for AES-GCM so your PR will fix it the mismatched object.
AES-GCM
Thanks for the catch!
Seems like the
length
property is being read from thedata
, but that property only exists on typed arrays.https://github.com/anvilresearch/webcrypto/blob/07129425f5d46f8e65f9f8c9732ad31abdc21537/src/algorithms/AES-GCM.js#L63
https://github.com/anvilresearch/webcrypto/blob/07129425f5d46f8e65f9f8c9732ad31abdc21537/src/algorithms/AES-GCM.js#L68-L71
I think that the proper approach is to read the
byteLength