j3crypto

0.1.2 • Public • Published

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'
);

Readme

Keywords

none

Package Sidebar

Install

npm i j3crypto

Weekly Downloads

0

Version

0.1.2

License

GPL-3.0-or-later

Unpacked Size

6.38 kB

Total Files

6

Last publish

Collaborators

  • anusviolin