Skip to content
aes-256-cbc encrypt and decrypt examples
Java CoffeeScript
Latest commit 7ebc7d5 Feb 15, 2012 @fukata change example
Failed to load latest commit information.
java first Feb 15, 2012
nodejs first Feb 15, 2012
README.md change example Feb 15, 2012

README.md

AES-256-CBC Example

Original program is here.

This sample, encryption, decryption input and output to the format of the following.

  • Encryption
    • Input: Raw Text
    • Output: Base64
  • Decryption
    • Input: Base64
    • Output: Raw Text

Since you are writing a common key for encryption in the library that you created for each language, when you actually use, please change.

Java

String src = "Hello,CryptWorld";
String enc = AESUtil.encrypt(src);
String dec = AESUtil.decrypt(enc);

Node.js

Encrypt = require './encrypt'
src = 'Hello,CryptWorld'
enc = Encrypt.encrypt src
dec = Encrypt.decrypt enc
Something went wrong with that request. Please try again.