cryptr-token

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

Downloads
8
Stars
0
Committers
1

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' }
Package Rankings
Top 23.04% on Npmjs.org
Related Projects