Skip to content

Commit

Permalink
docs: update Buffer note in KeyLike
Browse files Browse the repository at this point in the history
  • Loading branch information
panva committed Mar 31, 2021
1 parent caa8108 commit 435c74d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/types.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,9 @@ export interface GetKeyFunction<T, T2> {
*
* [Uint8Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array)
* is used exclusively for symmetric secret representations, a CryptoKey or KeyObject is
* preferred, but in Web Crypto API this isn't an option for some algorithms. In Node.js runtime
* [Buffer](https://nodejs.org/api/buffer.html#buffer_buffer)s are instances of Uint8Array.
* preferred, but in Web Crypto API this isn't an option for some algorithms.
* In Node.js the [Buffer](https://nodejs.org/api/buffer.html#buffer_buffer) class is a subclass of Uint8Array
* class. `jose` APIs accept plain Buffers wherever Uint8Array are supported as well.
*
* @example (node) Public KeyObject from a PEM public key
* ```js
Expand Down

0 comments on commit 435c74d

Please sign in to comment.