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();
}
Also in JavaScript:
- access method globally js
- js create array from for loop
- mongodb find like
- ngcc failed angular 9
- add object to array react hook
- nohup nodemon
- node close rabbitmq connection
- javascript make title blink
- math.floor
- react native text wrap
- react return action in a function
- face-api without projects
- concatenation of loop data in variable using jquery
- set a variable in express.js
- hiding header in a specific screen in react native
- js axios progress
- post request using vue.js github repo
- react native cover image in parent view
- less than equal to in javascript
- how to check if a kendo drop down is enabled js
- javascript convert binary to text
- remove a user from a reaction discord.js
- angular redirect to external url
- import leaflet js