simcrypto
v1.0.2
Published
This is a npm package that simplifies crypto module
Readme
#simcrypto
simcrypto simplifies the nodejs crypto module. It has SHA hashes, MD5 Hash, random token generation and RSA (public and private key) generation.
How to use:
1. npm i simcrypto
2. import SimCrypto from 'simcrypto';
3. const obj = new SimCrypto()
4. obj.<function>.then((value) => {console.log(value)}) //functions are asynchronous.
5. run your programList of functions:
1. GetSha(<ShaType>, <text>)
<ShaType> uses SHA-1. SHA-224, SHA-256, SHA-512, SHA-384.
<text> is the words you want to hash.
2. GetMD5(<text>)
GetMD5 use MD5 to encrypt the plain text.
3. GetRandomToken(<length>)
GetRandomToken creates a token of random uppercase letters, lowercase letters and numbers of a set <length>.
4. PrivatePublicKeys(<prime_length>, <encodeType>)
<prime_length> has to be above 500 or it won't work.
<encodeType> is just base64, hex, base64url or binary, pick one.[email protected] if you encounter any bugs.
