0.1.2 • Published 3 years ago
j3crypto v0.1.2
J3Crypto
0J3's Crypto Wrapper
this is an experiment, and wasn't intended for usage with important data in a production environement
API
(Required Arguments are bold - Format: FunctionName(Type ArgumentName = Default,Type2 ArgumentName2 = Default2) => ReturnType
)
J3Crypto.genKey(String password = '', Int KeyLength = 4096) => String
Generates a public and private keypair with a length of KeyLength
and the password of password
Example:
const { publicKey, privateKey } = J3Crypto.genKey('SomePassword', 8192);
J3Crypto.encrypt(String data, String publicKey) => String
Encrypts 'data' using 'publicKey'
Example:
const encryptedData = J3Crypto.encrypt('SomeString', publicKey);
J3Crypto.decrypt(String encrData, String privateKey, String keyPassword = '')
Decrypts 'encrData' using 'privateKey'
Example:
const decryptedData = J3Crypto.decrypt(
encryptedData,
privateKey,
'SomePassword'
);