Java code to decrypt the node.js encrypted string

我的未来我决定 提交于 2019-12-12 02:47:22

问题


I have a server which encrypts the some data using

var key = new Buffer('Kay8u5Dev5al7', 'utf-8');

var encrypt = function(key, data) {
    var cipher = crypto.createCipher('aes256', key);
    var crypted = cipher.update(data, 'utf-8', 'hex');
    crypted += cipher.final('hex');
    return crypted;
}

Now I want to decrypt the data back using a java client.

Though I referred some examples to decrypt in java I could'nt get the data back. I am using JCE security jars at the client side.

来源:https://stackoverflow.com/questions/33391533/java-code-to-decrypt-the-node-js-encrypted-string

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!