Node.js aes-256-cbc in Java -


how implement following node.js function in java?

function encrypt(text) {     var crypto = require('crypto');     var cipher = crypto.createcipher('aes-256-cbc','my-password')     var crypted = cipher.update(text,'utf8','hex')     crypted += cipher.final('hex');     return crypted; } 

i've read crypto derives key , iv password don't know how java.

thanks.

first of all, recommend use iv aes crypto, makes same plaintext different when encrypting, if use non-static iv.

there question/answer pair match search: click

ohterwise first thing found on google, maybe helps you: click

oh , might possible security issues: click


Comments

Popular posts from this blog

basic authentication with http post params android -

vb.net - Virtual Keyboard commands -

How to get multiresult with multicondition in Sql Server -