Code Monkey home page Code Monkey logo

advanced-encryption-standard-algorithm's Introduction

Java Documentation located in dist/javadoc

Command for encrypting: java AES e [-length] [-mode] keyFile inputFile
Command for decryption: java AES d [-length] [-mode] keyFile encryptedinputFile

-length is an optional argument which denotes the keysize that the user intends to use for the AES cipher (128 or 256).
-mode is an optional argument which denotes the mode of operation which will be used for the AES cipher (ECB or CBC).

The default options are: -length 128, and -mode ECB.

Note: In order for a more secure encryption, it is recommended that you use CBC. To use CBC, you need to add an Initialization Vector to your key file
in a new line after the key, which is a 32-character length hex character.

Files that are encrypted will have the file name: [inputfilename].enc
For decrypted files: [encryptedfilename].dec

Format for input: A file with each line containing 32 hex characters (hence, 16 bytes on each line).

An example of such input:

0A935D11496532BC1004865ABDCA4295
00112233445566778899AABBCCDDEEFF
   ....

advanced-encryption-standard-algorithm's People

Contributors

rishidewan33 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

advanced-encryption-standard-algorithm's Issues

An example Input

Could you please give me an example input that should go in the main String args[]

look your AES.java:160

if (line.matches("[0-9A-F]+")) //If line is valid (i.e. contains valid hex characters, encrpyt. Otherwise, skip line.

Check file is matches

========= my tests =====
`java
public class WhyCannotAESFile {

public static void main(String[] args) {

    String[] params = {"e", "-length", "128", "-mode", "ecb", "/home/liuyy/Documents/debuglog/a.key", "/home/liuyy/Documents/debuglog/ss.log"};
    try {
        AES.main(params);
    } catch (IOException e) {
        e.printStackTrace();
    } finally {
    }

}

}

`

a.key

3c6e0b8a9c15224a8228b9a98ca1531d

ss.log
HelloWorld Test Dot

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.