Skip to content
This repository has been archived by the owner on Dec 13, 2020. It is now read-only.

reelevant-tech/crypt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

@rlvt/crypt

JavaScript Style Guide

node CircleCI

How to

This package provides 2 functions,

encrypt(input: String, password: String)

and

decrypt(input: String, password: String)
const assert = require('assert')
const { encrypt, decrypt } = require('@rlvt/crypt')

const PASSWORD = 'rubikscube'
const MSG = 'OnePlus 5T > Apple iPhone X'

const encrypted = encrypt(MSG, PASSWORD)
const decrypted = decrypt(encrypted, PASSWORD)

assert.equal(encrypted, MSG)
// AssertionError [ERR_ASSERTION]: 'Mzc0NDFkMTdhNzhhOTFmMzY5MjI5NzQwNmVhZGJmZjY3NjRlMTViYjRkYzE0ZTI5ZmEwY2Y2MGQxYzRlZDQ1NQ==' == 'OnePlus 5T > Apple iPhone X'
assert.equal(decrypted, MSG)
// undefined

About

Encrypt and Decrypt function

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published