2023-03-03 18:25:07 -07:00
|
|
|
import type { BytesLike } from "../utils/index.js";
|
|
|
|
/**
|
|
|
|
* Compute the cryptographic SHA2-256 hash of %%data%%.
|
|
|
|
*
|
|
|
|
* @_docloc: api/crypto:Hash Functions
|
|
|
|
* @returns DataHexstring
|
|
|
|
*
|
|
|
|
* @example:
|
|
|
|
* sha256("0x")
|
|
|
|
* //_result:
|
|
|
|
*
|
|
|
|
* sha256("0x1337")
|
|
|
|
* //_result:
|
|
|
|
*
|
|
|
|
* sha256(new Uint8Array([ 0x13, 0x37 ]))
|
|
|
|
* //_result:
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
export declare function sha256(_data: BytesLike): string;
|
|
|
|
export declare namespace sha256 {
|
|
|
|
var _: (data: Uint8Array) => Uint8Array;
|
|
|
|
var lock: () => void;
|
|
|
|
var register: (func: (data: Uint8Array) => BytesLike) => void;
|
|
|
|
}
|
|
|
|
/**
|
|
|
|
* Compute the cryptographic SHA2-512 hash of %%data%%.
|
|
|
|
*
|
|
|
|
* @_docloc: api/crypto:Hash Functions
|
|
|
|
* @returns DataHexstring
|
|
|
|
*
|
|
|
|
* @example:
|
|
|
|
* sha512("0x")
|
|
|
|
* //_result:
|
|
|
|
*
|
|
|
|
* sha512("0x1337")
|
|
|
|
* //_result:
|
|
|
|
*
|
|
|
|
* sha512(new Uint8Array([ 0x13, 0x37 ]))
|
|
|
|
* //_result:
|
|
|
|
*/
|
|
|
|
export declare function sha512(_data: BytesLike): string;
|
|
|
|
export declare namespace sha512 {
|
|
|
|
var _: (data: Uint8Array) => Uint8Array;
|
|
|
|
var lock: () => void;
|
|
|
|
var register: (func: (data: Uint8Array) => BytesLike) => void;
|
|
|
|
}
|
2023-04-27 21:19:55 +09:00
|
|
|
//# sourceMappingURL=sha2.d.ts.map
|