merge: Add test case to KeywordShiftedAlphabet algorithm (#1013)

This commit is contained in:
Ankush263
2022-05-12 21:22:30 +05:30
committed by GitHub
parent 21a851176d
commit f736217341

View File

@ -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)
})