this is an experiment, and wasn't intended for usage with important data in a production environement
(Required Arguments are bold - Format: FunctionName(Type ArgumentName = Default,Type2 ArgumentName2 = Default2) => ReturnType
)
Generates a public and private keypair with a length of KeyLength
and the password of password
Example:
const { publicKey, privateKey } = J3Crypto.genKey('SomePassword', 8192);
Encrypts 'data' using 'publicKey'
Example:
const encryptedData = J3Crypto.encrypt('SomeString', publicKey);
Decrypts 'encrData' using 'privateKey'
Example:
const decryptedData = J3Crypto.decrypt(
encryptedData,
privateKey,
'SomePassword'
);