initial commit

This commit is contained in:
cupcakearmy
2019-03-30 20:50:04 +01:00
commit c1e4f4b1aa
10 changed files with 536 additions and 0 deletions

27
src/index.ts Normal file
View File

@@ -0,0 +1,27 @@
import AES from './AES'
import RSA from './RSA'
//
// (async () => {
//
// const text = `lorem ipsums`
// const key = `test`
//
// // Asymetric
// const pair = await RSA.gen()
// const ae = RSA.encrypt(text, pair.pub)
// console.log(ae)
// const ad = RSA.decrypt(ae, pair.prv)
// console.log(ad)
//
// // Symmetric
// const se = AES.encrypt(text, key, AES.Ciphers.AES_256_GCM)
// console.log(se)
// const sd = AES.decrypt(se, key)
// console.log(sd)
//
// })()
export default {
RSA,
AES,
}