Skip to content

this repository is AES block cipher using Rijndael algorithm

Notifications You must be signed in to change notification settings

devikkim/Rijndael_AES_CIPHER

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 

Repository files navigation

Rijndael_AES_CIPHER

this repository is AES block cipher using Rijndael algorithm

  1. create instance with pad mode
AESCipher cipher = new AESCipher(CBC_PKCS5PADDING);
  1. set key and iv (if seleted cbc mode)
byte[] plain = "abcdefghijklmnopqrstuvwxyz".getBytes();
byte[] key = "aaaaaaaaaaaaaaaabbbbbbbbbbbbbbbb".getBytes();
byte[] iv = "aaaaaaaaaaaaaaaa".getBytes();

cipher.setKey(key);
cipher.setIV(iv);
  1. encrypt (plain is byte[])
byte[] enc = cipher.encrypt(plain);
  1. decrypt
byte[] dec = cipher.decrypt(enc);

Author

devikkim, devikkim@gmail.com