Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(packages/sui-js): Add sha256 hash method #1734

Merged
merged 1 commit into from
Mar 7, 2024

Conversation

ivanmlaborda
Copy link
Contributor

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)

@jordevo
Copy link
Contributor

jordevo commented Mar 6, 2024

pretty safe to use with our main user base...

image

@ivanmlaborda ivanmlaborda merged commit 063ca67 into master Mar 7, 2024
1 check passed
@ivanmlaborda ivanmlaborda deleted the feature/sha-256-hash branch March 7, 2024 09:10
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.

4 participants