From 8d5002ae450c8eb78e57227339fb4187dc01b888 Mon Sep 17 00:00:00 2001 From: GavinLucky Date: Thu, 7 Nov 2024 23:43:16 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=20=E7=B1=BB=E5=9E=8B=E6=8A=A5=E9=94=99?= =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/views/demos/features/crypto/index.vue | 1 - .../features/crypto/inner/CryptoHooks.ts | 56 ------------------- 2 files changed, 57 deletions(-) diff --git a/playground/src/views/demos/features/crypto/index.vue b/playground/src/views/demos/features/crypto/index.vue index c4136fad229..2cf18afb217 100644 --- a/playground/src/views/demos/features/crypto/index.vue +++ b/playground/src/views/demos/features/crypto/index.vue @@ -61,7 +61,6 @@ watch( doAesEncryptFn(); }, { - debounce: 300, immediate: true, }, ); diff --git a/playground/src/views/demos/features/crypto/inner/CryptoHooks.ts b/playground/src/views/demos/features/crypto/inner/CryptoHooks.ts index 7156e85ccdb..4e445da9c9b 100644 --- a/playground/src/views/demos/features/crypto/inner/CryptoHooks.ts +++ b/playground/src/views/demos/features/crypto/inner/CryptoHooks.ts @@ -1,61 +1,5 @@ import { CryptoJS } from '@vben/utils'; -export function hashingFn1(inputMessage: string, type: string) { - const algorithms = type; - - let hashingOutput; - switch (algorithms) { - case 'MD5': { - hashingOutput = CryptoJS.MD5(inputMessage); - break; - } - case 'RIPEMD160': { - hashingOutput = CryptoJS.RIPEMD160(inputMessage); - break; - } - case 'SHA1': { - hashingOutput = CryptoJS.SHA1(inputMessage); - break; - } - case 'SHA224': { - hashingOutput = CryptoJS.SHA224(inputMessage); - break; - } - case 'SHA256': { - hashingOutput = CryptoJS.SHA256(inputMessage); - break; - } - case 'SHA384': { - hashingOutput = CryptoJS.SHA384(inputMessage); - break; - } - case 'SHA512': { - hashingOutput = CryptoJS.SHA512(inputMessage); - break; - } - case 'SHA3224': { - hashingOutput = CryptoJS.SHA3(inputMessage, { outputLength: 224 }); - break; - } - case 'SHA3256': { - hashingOutput = CryptoJS.SHA3(inputMessage, { outputLength: 256 }); - break; - } - case 'SHA3384': { - hashingOutput = CryptoJS.SHA3(inputMessage, { outputLength: 384 }); - break; - } - case 'SHA3512': { - hashingOutput = CryptoJS.SHA3(inputMessage, { outputLength: 512 }); - break; - } - default: { - hashingOutput = ''; - } - } - return hashingOutput.toString(); -} - type HashAlgorithm = | 'MD5' | 'RIPEMD160'