cryptobones-ts

1.0.3 • Public • Published

cryptobones-ts

Functions for cryptography

How to use

  1. import into your project like this

    npm i cryptobones-ts

  2. import functions

    import {encryptGCM_k,decryptGCM_k} from 'cryptobones-ts';

encryptGCM_k method

This function encrypts the messages, with a secret key, which is provided by the user, always use a 32-character secret key

warning

It is important that you keep this key, since to decrypt the text, this key must be the same with which it was encrypted.

import {encryptGCM_k} from 'cryptobones-ts'; 

//example
const data='Test for encrypt whit function';//your data for encrypt
const key='riHfCM8aqnMG4BcRx8IMip2P3PPzL8dS';//your secret key length 32-character

const myEncrypt=encryptGCM_k(data,key);

decryptGCM_k method

This function decrypts the messages, with a secret key, with which the message is encrypted, this key is provided by the user, always use a 32-character secret key

import {encryptGCM_k} from 'cryptobones-ts'; 

//example
const dataEncrypt='11844798f4dcfc896ce0aeb858c51339baf510e540ccfe1816d908d293f7:ec7df0fb739e1b2aa0e7d675:f044beaceab8a821c97ccad18d566f6b';//your data for decrypt
const key='riHfCM8aqnMG4BcRx8IMip2P3PPzL8dS';//your secret key length 32-character

const myDecrypt=encryptGCM_k(dataEncrypt,key);

Package Sidebar

Install

npm i cryptobones-ts

Weekly Downloads

0

Version

1.0.3

License

MIT

Unpacked Size

5.99 kB

Total Files

6

Last publish

Collaborators

  • fatobonq