Questions tagged [cryptojs]

CryptoJS is a growing collection of standard and secure cryptographic algorithms implemented in JavaScript using best practices and patterns. They are fast, and they have a consistent and simple interface.

CryptoJS is a growing collection of standard and secure cryptographic algorithms implemented in JavaScript using best practices and patterns. They are fast, and they have a consistent and simple interface.


Resources :

1614 questions
45
votes
5 answers

Encrypt with PHP, Decrypt with Javascript (cryptojs)

I'm having trouble with basic encryption/decryption. I've looked all around for a working example but haven't quite found a working example. -I will be encrypting in php, decrypting with cryptojs for a small layer of security
user2769
  • 459
  • 1
  • 5
  • 3
27
votes
3 answers

How to use CryptoJS with Angular 4

When I was not using Angular 4, I would just put the script tags for the library. Even when I put the script tags in the index.html file it is not recognizing CryptoJS. Is there a way to use the library or a Angular equivalent?
ecain
  • 1,282
  • 5
  • 23
  • 54
25
votes
1 answer

Can't verify signature witn Node.js Crypto, using key pairs

I've a very small code in nodejs where I sign a string and then try to verify it, using node crypto and key pairs generated with openssl. No matter what I try, the result is always "false", the signature can't be verified. Generation of…
Laerion
  • 805
  • 2
  • 13
  • 18
24
votes
9 answers

Why I get Malformed UTF-8 data error on crypto-js?

I try to encrypt and decrypt this string using crypto-js: const str =…
Jon Sud
  • 10,211
  • 17
  • 76
  • 174
23
votes
3 answers

Encrypt in PHP openssl and decrypt in javascript CryptoJS

I'm encrypting some parameters in PHP using openssl("parameter", "AES-256-ECB", "client") and I wish to decrypt in CryptoJS: CryptoJS.AES.decrypt(parameter, "client", {mode: CryptoJS.mode.ECB}).toString(CryptoJS.enc.Utf8); but it's throwing an…
Loveen Dyall
  • 824
  • 2
  • 8
  • 20
23
votes
5 answers

How to decrypt message with CryptoJS AES. I have a working Ruby example

I'm able to decrypt AES encrypted message with Ruby like this: require 'openssl' require 'base64' data =…
Priit
  • 5,200
  • 2
  • 21
  • 20
22
votes
2 answers

CryptoJS AES encryption and Java AES decryption

I'm only asking this because I have read many posts for 2 days now about crypto AES encryption, and just when I thought I was getting it, I realized I wasn't getting it at all. This post is the closest one to my issue, I have exactly the same…
Lauro182
  • 1,597
  • 3
  • 15
  • 41
22
votes
2 answers

Crypto-JS is now missing on google codes

I was using the online version of Crypto-Js hosted on google codes see below:
jofftiquez
  • 7,548
  • 10
  • 67
  • 121
20
votes
1 answer

Decode a Base64 String using CryptoJS

I am trying to create a simple webpage with the goal to send and encrypted message to the server (which will create a file with that content), then a link is created and the user who receive the link provided will be able to see the encrypted value…
aliasbody
  • 816
  • 3
  • 11
  • 25
17
votes
1 answer

How to sign a JWT with a private key (pem) in CryptoJS?

I am trying to create a signed JWT in postman with the following code function base64url(source) { // Encode in classical base64 encodedSource = CryptoJS.enc.Base64.stringify(source); // Remove padding equal characters …
user4233758
17
votes
3 answers

how to use CryptoJS in javascript

I used CryptoJS instead of nodejs crypto module because I just use the native JavaScript,but some codes can't work: function aesEncrypt(text, secKey) { const _text = text const lv = new Buffer('0102030405060708', 'binary') const _secKey = new…
zhaowweny
  • 241
  • 1
  • 2
  • 6
17
votes
2 answers

Compatible AES encryption and decryption for C# and javascript

I am trying to write two classes in C# and Javascript which I can use throughout my project to encrypt or decrypt data using AES when data is exchanged. Using AES I am embedding the Salt (32 bytes) and IV (16 bytes) in the encrypted result, this…
usselite
  • 846
  • 7
  • 24
16
votes
1 answer

How to decrypt password from JavaScript CryptoJS.AES.encrypt(password, passphrase) in Python

I have a password which is encrypt from JavaScript via var password = 'sample' var passphrase ='sample_passphrase' CryptoJS.AES.encrypt(password, passphrase) Then I tried to decrypt the password comes from JavaScript in Python: from…
Bing
  • 378
  • 1
  • 3
  • 15
16
votes
1 answer

CryptoJS and key/IV length

I have question about AES key and IV length. First of all, if, for example, I'm using drugs OpenSSL extension and openssl_encrypt() method, I can clearly see that key for 256-bit AES should be 32 bytes, and IV throws warning if it's different than…
Damaged Organic
  • 8,175
  • 6
  • 58
  • 84
15
votes
1 answer

Node.js crypto fails to sign pem key string from file with error:25066067:DSO support routines:dlfcn_load:could not load the shared library

I have two node projects running side by side in my Git directory. Same version of node 14.5, same pem key in root, same everything. Yet, one node process is able to sign my base64 pem key and the other is not. I can remove the base64 setting and…
Dennis Bauszus
  • 1,624
  • 2
  • 19
  • 44
1
2 3
99 100