All Projects → RizkyArifNur → strong-cryptor

RizkyArifNur / strong-cryptor

Licence: other
Strong encryption and decryption node js

Programming Languages

typescript
32286 projects

Projects that are alternatives of or similar to strong-cryptor

Py7zr
7zip in python3 with ZStandard, PPMd, LZMA2, LZMA1, Delta, BCJ, BZip2, and Deflate compressions, and AES encryption.
Stars: ✭ 110 (+511.11%)
Mutual labels:  decryption
Aescipher Ios
AES encryption working between Objective-C and Java.
Stars: ✭ 198 (+1000%)
Mutual labels:  decryption
Mercury
Mercury is a hacking tool used to collect information and use the information to further hurt the target
Stars: ✭ 236 (+1211.11%)
Mutual labels:  decryption
Cross Platform Aes
Simple cross-platform encryption and decryption using AES
Stars: ✭ 127 (+605.56%)
Mutual labels:  decryption
Java Rpg Maker Mv Decrypter
You can decrypt whole RPG-Maker MV Directories with this Program, it also has a GUI.
Stars: ✭ 142 (+688.89%)
Mutual labels:  decryption
Pgsodium
Modern cryptography for PostgreSQL using libsodium.
Stars: ✭ 202 (+1022.22%)
Mutual labels:  decryption
Machina
Network capture library for realtime TCP/IP decoding from a windows application. Includes an extension library to support FFXIV data capture.
Stars: ✭ 102 (+466.67%)
Mutual labels:  decryption
ciphr
CLI crypto swiss-army knife for performing and composing encoding, decoding, encryption, decryption, hashing, and other various cryptographic operations on streams of data from the command line; mostly intended for ad hoc, infosec-related uses.
Stars: ✭ 100 (+455.56%)
Mutual labels:  decryption
Helm Secrets
Successor of zendesk/helm-secrets - A helm plugin that help manage secrets with Git workflow and store them anywhere
Stars: ✭ 165 (+816.67%)
Mutual labels:  decryption
Jsrsasign
The 'jsrsasign' (RSA-Sign JavaScript Library) is an opensource free cryptography library supporting RSA/RSAPSS/ECDSA/DSA signing/validation, ASN.1, PKCS#1/5/8 private/public key, X.509 certificate, CRL, OCSP, CMS SignedData, TimeStamp, CAdES JSON Web Signature/Token in pure JavaScript.
Stars: ✭ 2,760 (+15233.33%)
Mutual labels:  decryption
Underlock
Underlock makes it dead simple to encrypt and decrypt your data and files. It comes with little to no dependencies and has a very small API surface.
Stars: ✭ 128 (+611.11%)
Mutual labels:  decryption
Padding Oracle Attacker
🔓 CLI tool and library to execute padding oracle attacks easily, with support for concurrent network requests and an elegant UI.
Stars: ✭ 136 (+655.56%)
Mutual labels:  decryption
Websafety
Simple and powerful web filter for HTTP and HTTPS traffic
Stars: ✭ 208 (+1055.56%)
Mutual labels:  decryption
Cryption
In-Browser AES File Encryption 🔐 with Data Integrity Check 🔍
Stars: ✭ 114 (+533.33%)
Mutual labels:  decryption
Laravel Database Encryption
A package for automatically encrypting and decrypting Eloquent attributes in Laravel 5.5+, based on configuration settings.
Stars: ✭ 238 (+1222.22%)
Mutual labels:  decryption
Easycrypt
Android cryptography library with SecureRandom patches.
Stars: ✭ 102 (+466.67%)
Mutual labels:  decryption
Dekryptize
A ncurses animation to make decryption look like, well, decryption.
Stars: ✭ 201 (+1016.67%)
Mutual labels:  decryption
kmstool
Tool for using AWS Kms data keys to encrypt and decrypt large files.
Stars: ✭ 33 (+83.33%)
Mutual labels:  decryption
Openssl
TLS/SSL and crypto library
Stars: ✭ 17,157 (+95216.67%)
Mutual labels:  decryption
Rpg Maker Mv Decrypter
You can decrypt RPG-Maker-MV Resource Files with this project ~ If you don't wanna download it, you can use the Script on my HP:
Stars: ✭ 228 (+1166.67%)
Mutual labels:  decryption

StrongCryptor

Pure javascript/typescript encryption without any depedencies

Travis (.org) Codacy Badge
npm version

strong-cryptor is lightweight utility to manage strong encryption and decryption with aes-256-cbc algorithm, strong-cryptor not using any depedencies to process the encryption and decryption, with strong-cryptor you can simplify the process of encryption and decryption as simple as just calling encrypt() and decrypt function. This library is pure Javascript library built with Typescript targeting ECMAScript 5(ES5), so it's compatible with most Node.Js backend or Javascript frontend applications.

List of Contents

Background

Idea behind this project is to avoid the same pattern of every encrypted data that can be learned by attacker and make it easy to decrypted by the attacker. with strong-cryptor every encryption process will have different result, even the data is same

Changes Log (What's New)

What's New in 2.2.0

  • File encryption support.
  • Add new feature to write the result of encryption/decryption to a file.
  • Change function base to class base.

For full changelog, please refers to Release Page.

Deprecation

The old encrypt() and decrypt() function are deprecated, and will be fully removed in version 3.0.0, please use class base instead.

Basic Concept

Encryption Concept

Concept behind strong-cryptor is to create randomize IV(Initial Vector) in every encryption process, and embed the IV to the result of encryption process

Command Result
encrypt('test') a0aade621f5e00dd21....
encrypt('test') d0dac814ee1f11be08....

Encryption Count Concept

Concept behind Encryption Count feature is to enable strong-cryptor to encrypt more than 1 times. example if you want tou encrypt text Hello guys, i am just plain text for 3 times

Encryption Count Result
0 Hello guys, i am just plain text
1 EiTvqlAtcXPhT5k+LZDhGQH1eAtUrczPsY...
2 zH2bXMRM3iYl6ZCRB2J3bgx8kXo9LaXy+iBJeJwOmTS7OWfGXBk/nIDR...
3 U2ghFawbO2VGhsk/l+bc/QYUzBLAXQJsrhkyzRK8s0GTGIuO+OUQMt3s57J2nPUD....

with this concept, the encryption result will more hard for the attacker to learn the pattern of the encryption process.

Note : size of encryption result depends on how many times the encryption run

Installation

To get this library included on your project, first, you can use package manager like npm or yarn command to get strong-cryptor.

npm i strong-cryptor

or

yarn add strong-cryptor

Documentation

For full documentation please refers to Doc folder.

Basic Encryption

To use strong-cryptor encryption first import Encryptor class from strong-cryptor

import { Encryptor } from 'strong-cryptor'

then create a key and new instance of Encryptor class with following parameters

import { Encryptor } from 'strong-cryptor'
const key = 'AHBSGTEUET125STSGBDHDJKXMPLKIU12' // store this key in secure place
const encryptor = new Encryptor({ key })

then encrypt your data with encrypt(data)

import { Encryptor } from 'strong-cryptor'
const data = 'your sensitive data'
const key = 'AHBSGTEUET125STSGBDHDJKXMPLKIU12' // store this key in secure place
const encryptor = new Encryptor({ key })
const encryptedData = encryptor.encrypt(data)

The code above will use aes-256-cbc encryption algorithm and base64 encoding as default encoding.

And to use strong-cryptor decryption you need import Decryptor class from strong-cryptor

import { Decryptor } from 'strong-cryptor'

Then create new instance of Encryptor class with following parameters

Full code :

import { Encryptor } from 'strong-cryptor'
const data = 'your sensitive data'
const key = 'AHBSGTEUET125STSGBDHDJKXMPLKIU12' // store this key in secure place
const encryptor = new Encryptor({ key })
const encryptedData = encryptor.encrypt(data)
const decryptor = new Decryptor({ key })
decryptor.decrypt(encryptedData)

Using Encryption Count

To make sure your encrypted data is secure, strong-cryptor providing a new feature called Encryption Count, this feature will encrypt your data as many as you want.

To use this feature you only need to fill up the encryption options.

import { Encryptor } from 'strong-cryptor'
const data = 'your sensitive data'
const key = 'AHBSGTEUET125STSGBDHDJKXMPLKIU12' // store this key in secure place
const encryptor = new Encryptor({ key, encryptionCount: 5 })
const encryptedData = encryptor.encrypt(data)
const decryptor = new Decryptor({ key, encryptionCount: 5 })
decryptor.decrypt(encryptedData)

Or

import { Encryptor } from 'strong-cryptor'
const data = 'your sensitive data'
const key = 'AHBSGTEUET125STSGBDHDJKXMPLKIU12' // store this key in secure place
const encryptor = new Encryptor({ key })
const encryptedData = encryptor.encrypt(data, { encryptionCount: 5 })
const decryptor = new Decryptor({ key })
decryptor.decrypt(encryptedData, { encryptionCount: 5 })

Make sure that you provide the encryptionCount at the decryption process too.

File Encryption

From version 2.2.0 strong-cryptor support for encrypting a file.

import { Encryptor } from 'strong-cryptor'
const key = 'AHBSGTEUET125STSGBDHDJKXMPLKIU12' // store this key in secure place
const encryptor = new Encryptor({ key })
const encryptedData = encryptor.encryptFile('path_to_your_file')
const decryptor = new Decryptor({ key })
decryptor.decryptFile(encryptedData, { toBuffer: true })

Write to File

If you want to write your encryption/decryption result to some file, just fill up writeToFile property in encryption/decryption options.

import { Encryptor } from 'strong-cryptor'
const data = 'your sensitive data'
const key = 'AHBSGTEUET125STSGBDHDJKXMPLKIU12' // store this key in secure place
const encryptor = new Encryptor({ key })
const encryptedData = encryptor.encrypt(data, { writeToFile: 'path_to_file' })
const decryptor = new Decryptor({ key })
decryptor.decrypt(encryptedData, { writeToFile: 'path_to_file' })

Generate Key

strong-cryptor can also generate a key for encryption/decryption process.

but we don't guarantee that the key is secure.

import { genKey } from 'strong-cryptor'
const key = genKey() // please store this key in the safe place

The genKey() will return a 256bits / 32 characters string.

Built With

Written in TypeScript, built into ECMAScript 5 using the TypeScript compiler.

Contribution

This project already using Travis for CI/CD purpose, and Codacy for code review and analytics. To contribute, simply fork this project, and issue a pull request.

This project using commitizen & cz-conventional-changelog for commit purpose, make sure when you commit a new change, you're using yarn commit instead of git commit or your PR will be rejected.

Version Management

We use SemVer for version management and semantic-release for automated release. For the versions available, see the releases on this repository.

Authors

See also the list of contributors who participated in this project. .

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].