Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

encriptar exadecimal con cryptojs

import CryptoJS from 'crypto-js'
import AES from 'crypto-js/aes'

const SECRET = 'I am batman'
const plainText = 'This is Sparta!'

export function enc(plainText){
    // returns something like this U2FsdGVkX184He5Rp991JYAiCSdTwfZs8T3kJUk3zAc=  
    // but with random `/` and I dont want that
    // I want it to be Hex but .toString(CryptoJs.enc.Hex) 
    // is not working, it just returns an '' empty string
    // it's a string, I checked using typeof
    return AES.encrypt(plainText, SECRET).toString();
}
Comment

PREVIOUS NEXT
Code Example
Javascript :: my datatable in flutter from json repeat the column headers 
Javascript :: extension for local storage in angular 8 
Javascript :: how to translate english to hindi after enter space using javascript 
Javascript :: remove state from location on page load in react router dom 
Javascript :: angular router navigate base href 
Javascript :: how to see line number in gatway script 
Javascript :: how to iterate in array of array 
Javascript :: how to access viewmodel in jquery 
Javascript :: 11. Which of the following metals catch fire on reaction with air? A. Magnesium B. Manganese C. Potassium D. Calcium 
Javascript :: how to clear text ibput after message sent react native 
Javascript :: reactjs web3 components 
Javascript :: u017f javascript 
Javascript :: Checkbox not binding to scope in angularjs 
Javascript :: replace innerhtml javascript by regex 
Javascript :: Uncaught ReferenceError: jQuery is not defined at (index): "405" 
Javascript :: screen.render is not a function in node 
Javascript :: node js if 
Javascript :: reactnative print in ios 
Javascript :: json property becoming small after retriving from .net core controller 
Javascript :: flutter betterplayer get aspect ratio 
Javascript :: why js object alis are on the lef 
Javascript :: copy link url javascript 
Javascript :: keydown check if character is typed javascript 
Javascript :: const toogleState = (index) ={ console.log(index); } 
Javascript :: chart js how padding will be set between ticks lables 
Javascript :: React native-base DatePicker comes up Minimized on iOS Asked 
Javascript :: different getters js 
Javascript :: how to open javascript file 
Javascript :: javscript explode by backticks 
Javascript :: android studio select sim slot to send sms 
ADD CONTENT
Topic
Content
Source link
Name
6+1 =