Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

amcryption npm package

const amcryption = require('amcryption')

/*
-----------------------------------------------------------------------------------
-=-=-=-=-=-=-= Creating the instance of the Encoder and Decoder class-=-=-=-=-=-=-=
------------------------- For Simple Encoding and Decoding-------------------------
-----------------------------------------------------------------------------------
*/
const encoder = amcryption.getEncoder()
const decoder = amcryption.getDecoder()


/*
-----------------------------------------------------------------------------------
ENCODING THE DATA
*/
let encoded_string = encoder.encode('...put your string data here...')

// For Example,
let encoded_email = encoder.encode('example@email.com')
// Encoded value will be =>  bllNbFdPeElDSC56ekxvckNJQXpLbllNdkdFSEB6dkdFekxvdlBrbllNQXpLblhjdkdF

/*
-----------------------------------------------------------------------------------
DECODING THE DATA
*/
let decoded_string = decoder.decode('...put your encoded string data here...')

// For example,
let decoded_email = decoder.decode('bllNbFdPeElDSC56dkdFekxvdlBrbllNQXpLblhjdkdFSEB6bFphYk1Zblhj')
// Decoded value will be => xyz@example.com



/*
-----------------------------------------------------------------------------------
-=-=-=-=-=-=-=-=-=-= Creating the instance of the Crypto class-=-=-=-=-=-=-=-=-=-=
----------------- For encrypting and decrypting data using crypto-----------------
-----------------------------------------------------------------------------------
*/
const crypto = amcryption.getCrypto()

// For Encryption
let encrypted_text = crypto.encrypt('--Your Text--')

// For Decryption
let decrypted_text = crypto.decrypt('--Encrypted text--')
Comment

PREVIOUS NEXT
Code Example
Javascript :: CELEBRITY PROBLEM 2 gfg 7-18-21 
Javascript :: js match property 
Javascript :: delete all properties from an javascript object 
Javascript :: javascript fix errora 
Javascript :: jquery input cvv format 
Javascript :: textfield extjs retrinjir a 4 caracteres 
Javascript :: discord.js change role permissions 
Javascript :: Cannot GET / 
Javascript :: cy wait for xhr 
Javascript :: uselazyquery refetch from child 
Javascript :: instantiation javascript 
Javascript :: Make stepper with 2 values javascript 
Javascript :: how do i count the number of occurrences in a string javascript 
Javascript :: js get word before question mark 
Javascript :: negate expression prolog 
Javascript :: col flex antd 
Javascript :: which element is focused javascript console 
Javascript :: javascript set css after property 
Javascript :: document get all elements by property has white color 
Javascript :: jquery keyup only alphanumeric 
Javascript :: push array into another array at random positions javascript 
Javascript :: how to move an array over one 
Javascript :: any-text npm 
Javascript :: isnumber javascript 
Javascript :: npm ERR! code EBADPLATFORM stylint 
Javascript :: delete all elements with class javascript 
Javascript :: how to get json data from url python flask get column 
Javascript :: indexOf() usages 
Javascript :: invite tracker node.js v13 
Javascript :: Falsy Bouncer 
ADD CONTENT
Topic
Content
Source link
Name
9+7 =