description = "Library implementing a variation of Simple And Efficient Data Encryption Algorithm (INTERNATIONAL JOURNAL OF SCIENTIFIC & TECHNOLOGY RESEARCH VOLUME 8, ISSUE 12, DECEMBER 2019 ISSN 2277-8616)"
description = "Library implementing a variation of Simple And Efficient Data Encryption Algorithm (INTERNATIONAL JOURNAL OF SCIENTIFIC & TECHNOLOGY RESEARCH VOLUME 8, ISSUE 12, DECEMBER 2019 ISSN 2277-8616)"
# This is just an example to get you started. You may wish to put all of your
# tests into a single file, or separate them into multiple `test1`, `test2`
# etc. files (better names are recommended, just make sure the name starts with
# the letter 't').
#
# To run these tests, simply execute `nimble test`.
# To run these tests, simply execute `nimble test`.
importunittest
importunittest
importstrutils
importtimes
importtimes
importlibSAEDEA
importlibSAEDEA
vartext="This is a clear text message... 12 12 123 and the current time is:"&$getTime()
proc cmpStrChars(s1:string,s2:string):bool=
varsecret="shared secret"
ifs1.len!=s2.len:
variv=gen_iv("true random data")
returnfalse
varencrypted=encrypt(text,secret,iv)
foriin0..s1.len-1:
vardecrypted=decrypt(encrypted,secret,iv)
ifs1[i]!=s2[i]:
echo"Secret:",secret
returnfalse
echo"IV:",iv
returntrue
echo"Cleartext:",text
echo"Decrypted:",decrypted
lettext="This is a clear text message... ABCDEF 12 12 123 1234 12345 123456 $*[]@!%ù 🤖😱🎰🔮📿💈⚗️🔭🔬 Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod... And the current time is:"&$getTime()