PHP WebShell
Текущая директория: /var/www/bitcardoApp/node_modules/ethers/src.ts/hash
Просмотр файла: id.ts
import { keccak256 } from "../crypto/index.js";
import { toUtf8Bytes } from "../utils/index.js";
/**
* A simple hashing function which operates on UTF-8 strings to
* compute an 32-byte identifier.
*
* This simply computes the [UTF-8 bytes](toUtf8Bytes) and computes
* the [[keccak256]].
*
* @example:
* id("hello world")
* //_result:
*/
export function id(value: string): string {
return keccak256(toUtf8Bytes(value));
}
Выполнить команду
Для локальной разработки. Не используйте в интернете!