Skip to content
/ cipher Public

Implementations of ciphers in Java for educational purpose

License

Notifications You must be signed in to change notification settings

gitzart/cipher

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cipher

Build Status codecov

Implementations of ciphers in Java for educational purpose.

Example

public class Main {
    public static void main(String[] args) throws IOException {
        // Encrypt
        String secret = new CaesarCipher(17).encrypt("Hello, Caesar!");
        System.out.println(secret);
        // => Yvccf, Trvjri!

        // Prepare decryption
        String file = "dictionary-book.txt"; 
        CaesarBreakerOneKey b = new CaesarBreakerOneKey(file);
        
        // Decrypt
        b.decrypt(secret);
        if (b.canDecrypt()) {
            System.out.println(b.key + " | " + b.decrypted);
            // => 17 | Hello, Caesar!
        } else {
            System.out.println("Can't decrypt");
        }
    }
}

Links

About

Implementations of ciphers in Java for educational purpose

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages