feat(crypto): re-added `sha256()` function
Issue https://github.com/unjs/ohash/issues/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.
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)
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.