Closed ivanmlaborda closed 6 months ago
We are adding the sha256 hash method to sui-js utilities. This new function uses browser native methods so we are not coupling it to third-party libraries. This method will be async, so we are naming it createAsyncSha256.
https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto/digest#converting_a_digest_to_a_hex_string
import {createAsyncSha256} from '@s-ui/js/lib/hash'
const hashedValue = await createAsyncSha256(value)
pretty safe to use with our main user base...
Description
We are adding the sha256 hash method to sui-js utilities. This new function uses browser native methods so we are not coupling it to third-party libraries. This method will be async, so we are naming it createAsyncSha256.
https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto/digest#converting_a_digest_to_a_hex_string
Example
import {createAsyncSha256} from '@s-ui/js/lib/hash'
const hashedValue = await createAsyncSha256(value)