import sjcl from "../internal/sjcl.js" ; const sha256 = new sjcl . hash . sha256 ( ) ; export const SHA256_HASH_LENGTH_BYTES = 32 ; param uint8Array return export function sha256Hash ( uint8Array ) { try { sha256 . update ( sjcl . codec . arrayBuffer . toBits ( uint8Array . buffer ) ) ; return new Uint8Array ( sjcl . codec . arrayBuffer . fromBits ( sha256 . finalize ( ) , false ) ) ; } finally { sha256 . reset ( ) ; } }