/******************************************************************** * @author: Kaven * @email: kaven@wuwenkai.com * @website: http://blog.kaven.xyz * @file: [Kaven-Basic] /src/libs/Hash.ts * @create: 2021-12-17 10:53:01.473 * @modify: 2025-07-11 20:47:10.534 * @version: 6.0.0 * @times: 27 * @lines: 349 * @copyright: Copyright © 2021-2025 Kaven. All Rights Reserved. * @description: [description] * @license: * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. ********************************************************************/ import { TSyncHashInput, TAsyncHashInput } from "./type/advanced"; import { KavenCRC } from "./hash/KavenCRC"; import { KavenMD5 } from "./hash/KavenMD5"; import { KavenSHA } from "./hash/KavenSHA"; import { KavenSHA3 } from "./hash/KavenSHA3"; export declare const MD5: KavenMD5; export declare const CRC32: KavenCRC; export declare const CRC64: KavenCRC; export declare const SHA: KavenSHA; export declare const SHA3: KavenSHA3; /** * @since 1.1.13 * @version 2025-05-20 */ export declare function GetMD5(input: TSyncHashInput): string; /** * @since 4.5.0 * @version 2025-05-20 */ export declare function GetMD5Async(input: TAsyncHashInput): Promise; /** * @since 1.1.20 * @version 2025-05-20 */ export declare function GetCRC32(input: TSyncHashInput): import("..").BitString; /** * @since 4.5.0 * @version 2025-05-20 */ export declare function GetCRC32Async(input: TAsyncHashInput): Promise; /** * @since 1.1.20 * @version 2025-05-20 */ export declare function GetCRC64(input: TSyncHashInput): import("..").BitString; /** * @since 4.5.0 * @version 2025-05-20 */ export declare function GetCRC64Async(input: TAsyncHashInput): Promise; /** * Warning: This algorithm is now considered vulnerable and should not be used. * @since 1.1.20 * @version 2025-05-20 */ export declare function GetSHA1(input: TSyncHashInput): string; /** * Warning: This algorithm is now considered vulnerable and should not be used. * @since 4.5.0 * @version 2025-05-20 */ export declare function GetSHA1Async(input: TAsyncHashInput): Promise; /** * SHA-224 * @since 1.1.20 * @version 2025-05-20 */ export declare function GetSHA224(input: TSyncHashInput): string; /** * SHA-224 * @since 4.5.0 * @version 2025-05-20 */ export declare function GetSHA224Async(input: TAsyncHashInput): Promise; /** * SHA-256 * @since 1.1.20 * @version 2025-05-20 */ export declare function GetSHA256(input: TSyncHashInput): string; /** * SHA-256 * @since 4.5.0 * @version 2025-05-20 */ export declare function GetSHA256Async(input: TAsyncHashInput): Promise; /** * SHA-384 * @since 1.1.20 * @version 2025-05-20 */ export declare function GetSHA384(input: TSyncHashInput): string; /** * SHA-384 * @since 4.5.0 * @version 2025-05-20 */ export declare function GetSHA384Async(input: TAsyncHashInput): Promise; /** * SHA-512 * @since 1.1.20 * @version 2025-05-20 */ export declare function GetSHA512(input: TSyncHashInput): string; /** * SHA-512 * @since 4.5.0 * @version 2025-05-20 */ export declare function GetSHA512Async(input: TAsyncHashInput): Promise; /** * @since 1.1.20 * @version 2025-05-20 */ export declare function GetSHA512T(input: TSyncHashInput, t: number): string; /** * @since 4.5.0 * @version 2025-05-20 */ export declare function GetSHA512TAsync(input: TAsyncHashInput, t: number): Promise; /** * SHA-512/224 * @since 4.0.0 * @version 2025-05-20 */ export declare function GetSHA512T224(input: TSyncHashInput): string; /** * SHA-512/224 * @since 4.5.0 * @version 2025-05-20 */ export declare function GetSHA512T224Async(input: TAsyncHashInput): Promise; /** * SHA-512/256 * @since 4.0.0 * @version 2025-05-20 */ export declare function GetSHA512T256(input: TSyncHashInput): string; /** * SHA-512/256 * @since 4.5.0 * @version 2025-05-20 */ export declare function GetSHA512T256Async(input: TAsyncHashInput): Promise; /** * SHA3-224 * @since 4.0.0 * @version 2025-05-20 */ export declare function GetSHA3P224(input: TSyncHashInput): string; /** * SHA3-224 * @since 4.5.0 * @version 2025-05-20 */ export declare function GetSHA3P224Async(input: TAsyncHashInput): Promise; /** * SHA3-256 * @since 4.0.0 * @version 2025-05-20 */ export declare function GetSHA3P256(input: TSyncHashInput): string; /** * SHA3-256 * @since 4.5.0 * @version 2025-05-20 */ export declare function GetSHA3P256Async(input: TAsyncHashInput): Promise; /** * SHA3-384 * @since 4.0.0 * @version 2025-05-20 */ export declare function GetSHA3P384(input: TSyncHashInput): string; /** * SHA3-384 * @since 4.5.0 * @version 2025-05-20 */ export declare function GetSHA3P384Async(input: TAsyncHashInput): Promise; /** * SHA3-512 * @since 4.0.0 * @version 2025-05-20 */ export declare function GetSHA3P512(input: TSyncHashInput): string; /** * SHA3-512 * @since 4.5.0 * @version 2025-05-20 */ export declare function GetSHA3P512Async(input: TAsyncHashInput): Promise; /** * SHAKE128 * @since 4.0.0 * @version 2025-05-20 */ export declare function GetSHAKE128(input: TSyncHashInput, outputBits: number): string; /** * SHAKE128 * @since 4.5.0 * @version 2025-05-20 */ export declare function GetSHAKE128Async(input: TAsyncHashInput, outputBits: number): Promise; /** * SHAKE256 * @since 4.0.0 * @version 2025-05-20 */ export declare function GetSHAKE256(input: TSyncHashInput, outputBits: number): string; /** * SHAKE256 * @since 4.5.0 * @version 2025-05-20 */ export declare function GetSHAKE256Async(input: TAsyncHashInput, outputBits: number): Promise; //# sourceMappingURL=Hash.d.ts.map