Questions tagged [mcrypt-js]

A javascript version of php's mcrypt

This class allows a common interface to encrypt extended ascii strings with various modes of operation. Currently supported are:

ecb cbc cfb ncfb nofb ctr

The block encryption is handled by external classes, making this class extensible Currently the block ciphers used are:

rijndael-128 rijndael-192 rijndael-256 serpent

This is compatible with php's mcrypt.

JS-Mcrypt

5 questions
6
votes
2 answers

Mcrypt js encryption value is different than that produced by PHP mcrypt / Mcrypt JS decrypt doesn't work for UTF-8 chars

I have been trying to implement mcrypt encryption/ decryption technique on both server end, PHP and client end. I am trying to use mcrypt.js library at the moment as:
hsuk
  • 6,770
  • 13
  • 50
  • 80
1
vote
0 answers

Mcrypt PHP To Mcrypt JS Conversion

Is it possible to convert following php function which is using mcrypt standards to js using mcrypt lib. function fnEncrypt($sValue, $sSecretKey) { return rtrim( base64_encode( mcrypt_encrypt( …
Divyam Solanki
  • 461
  • 2
  • 7
  • 25
1
vote
0 answers

Node.js Mcrypt Segmentation Fault

I am writing a node.js application where I use Mycrypt (https://www.npmjs.org/package/mcrypt) however I am getting a segmentation fault when I try to encrypt a string. I am running on CentOS. The code is below: exports.encode = function (string,…
ewein
  • 2,695
  • 6
  • 36
  • 54
0
votes
2 answers

MCrypt class use simcard serial number as SecretKey

How can I read the Simcard serial number and use the first 16 numbers as a SecretKey ........ private String SecretKey = "0123456789abcdef";**//Read the Simcard serial number and use the first 16 numbers as a SecretKey** public…
Goran
  • 7
  • 4
-1
votes
1 answer

Decrypting Blowfish CBC in Javascript that has been encrypted with PHP mcrypt

I'm having a hard time trying to decrypt a String that has been encrypted with Blowfish CBC in PHP; I'm working on the client side in Javascript with Node.js on a unit test written with Mocha. I'm using the inbuilt crypto functions of Node. Here's…
tchoum
  • 312
  • 1
  • 2
  • 10