加密(cryptojs) - 解密(erlang) [英] Encrypt (cryptojs) - Decrypt (erlang)

查看:176
本文介绍了加密(cryptojs) - 解密(erlang)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个使用cryptoJS(AES)加密的值,需要使用Erlang加密库进行解密。我的问题在于,为了能够使用 aes_cbc_128_decrypt(Key,IVec,Cipher)在Erlang中进行解密,我认为,我将需要知道IVec是什么这是被使用的,以及Key应该如何组成。

  var ciphertext = Crypt.AES.encrypt(message here,4445); 
// U2FsdGVkX1 + ZxppJRvcbdWJW1xAxSlm2akm7ZFnY9GU =


解决方案

=< 0:128 >>,键的长度应为16的倍数。


I have a value encrypted with cryptoJS (AES) and need to decrypt using Erlang crypto library. The problem for me lies in the fact that to be able to decrypt in Erlang using aes_cbc_128_decrypt(Key, IVec, Cipher) I presume, I will need to know what the IVec is that was used and how the Key should be made up.

var ciphertext = Crypt.AES.encrypt("message here", "4445");  
// U2FsdGVkX1+ZxppJRvcbdWJW1xAxSlm2akm7ZFnY9GU=

解决方案

IVec = <<0:128>>, and the length of the key should be a multiple of 16.

这篇关于加密(cryptojs) - 解密(erlang)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆