/* global crypto */
import { from } from './hasher.js';
function sha(name) {
    return async (data) => new Uint8Array(await crypto.subtle.digest(name, data));
}
export const sha256 = from({
    name: 'sha2-256',
    code: 0x12,
    encode: sha('SHA-256')
});
export const sha512 = from({
    name: 'sha2-512',
    code: 0x13,
    encode: sha('SHA-512')
});//# sourceMappingURL=http://go/sourcemap/sourcemaps/042b3c1a4c53f2c3808067f519fbfc67b72cad80/node_modules/multiformats/dist/src/hashes/sha2-browser.js.map