Skip to content

Conversation

@zsilbi
Copy link
Collaborator

@zsilbi zsilbi commented Apr 16, 2025

Issue #156

Re-added the sha256 hex function:

import { sha256 } from "ohash/sha256";

// "a591a6d40bf420404a011733cfb7b190d62c65bf0bcda32b57b277d9ad9f146e"
console.log(sha256("Hello World"));

Added back the tests for the js/node implementations.
Updated README accordingly.

@pi0
Copy link
Member

pi0 commented Apr 16, 2025

Thanks for splitting PR. Can you try to minimize changes? adding back hex should not required this much (if no success no worry i try later)

@zsilbi
Copy link
Collaborator Author

zsilbi commented Apr 16, 2025

Thanks for splitting PR. Can you try to minimize changes? adding back hex should not required this much (if no success no worry i try later)

I did not want to import from js/crypto/index.ts to js/crpto/sha256.ts, that's why I moved the classes to their original location (_core.ts) so I can use these in both export locations.

I can move those back to index.ts but it looks weird to me.

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.

3 participants