1.0.2 • Published 5 years ago

cryptr-token v1.0.2

Weekly downloads
3
License
ISC
Repository
github
Last release
5 years ago

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' }
1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago