docs(crypto): add module example (#4476)

docs(crypto): add module docs
This commit is contained in:
Asher Gomez 2024-03-12 16:56:28 +11:00 committed by GitHub
parent 48d7fd5b01
commit 504bb0b1ce
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -7,6 +7,16 @@
* supporting additional encryption APIs, but also delegating to the built-in
* APIs when possible.
*
* ```ts
* import { crypto } from "https://deno.land/std@$STD_VERSION/crypto/crypto.ts";
*
* const message = "Hello, Deno!";
* const encoder = new TextEncoder();
* const data = encoder.encode(message);
*
* await crypto.subtle.digest("BLAKE3", data);
* ```
*
* @module
*/