1 | // Copyright 2017-2023 @polkadot/util-crypto authors & contributors
|
2 | // SPDX-License-Identifier: Apache-2.0
|
3 |
|
4 | import { blake2AsU8a } from "../blake2/index.js";
|
5 | import { keccakAsU8a } from "../keccak/index.js";
|
6 | export function hasher(hashType, data, onlyJs) {
|
7 | return hashType === 'keccak' ? keccakAsU8a(data, undefined, onlyJs) : blake2AsU8a(data, undefined, undefined, onlyJs);
|
8 | } |
\ | No newline at end of file |