From ce9f7b1fe70cccf28733715598a90200be45d701 Mon Sep 17 00:00:00 2001 From: Ankush263 Date: Thu, 12 May 2022 20:04:29 +0530 Subject: [PATCH] Add test case to KeywordShiftedAlphabet algorithm --- Ciphers/test/KeywordShiftedAlphabet.test.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 Ciphers/test/KeywordShiftedAlphabet.test.js diff --git a/Ciphers/test/KeywordShiftedAlphabet.test.js b/Ciphers/test/KeywordShiftedAlphabet.test.js new file mode 100644 index 0000000000..7cc7c4820b --- /dev/null +++ b/Ciphers/test/KeywordShiftedAlphabet.test.js @@ -0,0 +1,13 @@ +import { encrypt, decrypt } from '../KeywordShiftedAlphabet' + +test('Hello world! === dcrypt(encrypt(Hello world!))', () => { + const word = 'Hello world!' + const result = decrypt('keyword', encrypt('keyword', word)) + expect(result).toMatch(word) +}) + +test('The Algorithms === dcrypt(encrypt(The Algorithms))', () => { + const word = 'The Algorithms' + const result = decrypt('keyword', encrypt('keyword', word)) + expect(result).toMatch(word) +}) pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy