PeculiarVentures / webcrypto-core

A input validation layer for WebCrypto polyfills.
MIT License
28 stars 13 forks source link

PrepareData copies all the data from the buffer backing the passed BufferSource even if it's a view #11

Closed porcellus closed 2 years ago

porcellus commented 7 years ago

This causes especially hard to find problems because in many cases the input is still valid but gives a different result. It's easy to work around, but it can be really hard to find.

The problematic line: https://github.com/PeculiarVentures/webcrypto-core/blob/master/src/base.ts#L26