cryptr-token

1.0.2 • Public • Published

cryptr-token

cryptr-token is a simple aes-256-ctr token module for node.js

        const secret = 'secret$$$$here'
        const {encrypt} = Cipher(secret)
        const {decrypt} = Cipher(secret)

        const input = {message: 'hello'}

        const token = encrypt(input);

        console.log('input', input);
        console.log('token', token);

        const ouptput = decrypt(token)
        console.log('ouptput', ouptput);
        
        assert.deepEqual(input, ouptput)

Output

input { message: 'hello' }
token dceVmpYL5MHit3B1HI4gEDw67aE6gjby4onKrKJRoy769qI
ouptput { message: 'hello' }

Readme

Keywords

none

Package Sidebar

Install

npm i cryptr-token

Weekly Downloads

3

Version

1.0.2

License

ISC

Unpacked Size

3.24 kB

Total Files

4

Last publish

Collaborators

  • slava.hatnuke