Skip to content

Conversation

@mmmoussa
Copy link
Contributor

The API specification for Crypto.getRandomValues says the following for its input paremeter:

An integer-based TypedArray, that is one of: Int8Array, Uint8Array, Uint8ClampedArray, Int16Array, Uint16Array, Int32Array, Uint32Array, BigInt64Array, BigUint64Array (but not Float32Array nor Float64Array). All elements in the array will be overwritten with random numbers.

This library currently has the following issues:

  • The type of the input argument is incorrect
  • The elements in the array are not overwritten with the random numbers

We recently had this discrepancy break functionality in another library because of not matching the API. This PR makes this library match the API specification.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant