constc=newCrypto;console.log(c.nato("e","defri indra mahardika"));// Output : // Delta Echo Foxtrot Romeo India(space) India November Delta Romeo Alfa(space) Mike Alfa Hotel Alfa Romeo Delta India Kilo Alfa
Affine Cipher
Description
Name
Params
Type Data
Nullable
Description
affine
type
string
✖️
d, decode, e, encode
source_text
string
✖️
plaintext
keys
Array
✖️
must contain 2 key number . eg : [3, 1]
custom_letters
string
✔️
eg : KLMNOPQRSTUVWXYZABCDEFGHIJ
Sample
constc=newCrypto;letcustom_letters="OPQRSTUVWXYZABCDEFGHIJKLMN";letciphertext="Iloyx Xmiyz Jzuzyixdz";letplaintext="Defri Indra Mahardika"letkey=[3,1];console.log(c.affine("e",plaintext,key,custom_letters));console.log(c.affine("d",ciphertext,key,custom_letters));// Output : // Delta Echo Foxtrot Romeo India(space) India November Delta Romeo Alfa(space) Mike Alfa Hotel Alfa Romeo Delta India Kilo Alfa