Coder Social home page Coder Social logo

aria_cipher's Introduction

ARIA_CIPHER

ARIA is standard block cipher of South Korea this class support only cbc, ecb mode

  1. create instance with pad mode
ARIACipher cipher = new ARIACipher(CBC_NoPadding);
  1. set key and iv (if seleted cbc mode)
byte[] key = new byte[] { (byte) 0x43, (byte) 0xa2, (byte) 0xac, (byte) 0x7a, (byte) 0x87, (byte) 0xf8,
          (byte) 0x65, (byte) 0x90, (byte) 0x52, (byte) 0xf2, (byte) 0xf5, (byte) 0x19, (byte) 0xff, (byte) 0xad,
          (byte) 0x3d, (byte) 0xab };
          
byte[] iv = new byte[] { (byte) 0x79, (byte) 0x3e, (byte) 0x9a, (byte) 0x56, (byte) 0x31, (byte) 0x67,
          (byte) 0x83, (byte) 0xf5, (byte) 0x99, (byte) 0xb3, (byte) 0xb6, (byte) 0x24, (byte) 0xf6, (byte) 0x9f,
          (byte) 0x88, (byte) 0x73 };
          
byte[] plain = "aria test plain ".getBytes();

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

Author

devikkim, [email protected]

aria_cipher's People

Contributors

devikkim avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.