@@ -0,0 +1,2651 @@
+package com.github.booknara.cryptographic;%0A%0Aimport java.security.MessageDigest;%0Aimport java.security.NoSuchAlgorithmException;%0Aimport java.util.Formatter;%0A%0Apublic class CryptographicHashFunction %7B%0A%0A    public static void main(String%5B%5D args) %7B%0A        String input = new String(%22input_string%22);%0A%0A        MessageDigest digest;%0A        try %7B%0A            // MD5%0A            digest = MessageDigest.getInstance(%22MD5%22);%0A            System.out.printf(digest.getAlgorithm() + %22 (%25s) = %25s %5Cn%22, input, bytesTooHex(getHashValue(digest, input.getBytes())));%0A            System.out.printf(digest.getAlgorithm() + %22 (%25s) = %25s %5Cn%22, input, bytesTooHex(getHashValue(digest, input.getBytes())));%0A            // SHA-1%0A            digest = MessageDigest.getInstance(%22SHA-1%22);%0A            System.out.printf(digest.getAlgorithm() + %22 (%25s) = %25s %5Cn%22, input, bytesTooHex(getHashValue(digest, input.getBytes())));%0A            System.out.printf(digest.getAlgorithm() + %22 (%25s) = %25s %5Cn%22, input, bytesTooHex(getHashValue(digest, input.getBytes())));%0A            // SHA-256%0A            digest = MessageDigest.getInstance(%22SHA-256%22);%0A            System.out.printf(digest.getAlgorithm() + %22 (%25s) = %25s %5Cn%22, input, bytesTooHex(getHashValue(digest, input.getBytes())));%0A            System.out.printf(digest.getAlgorithm() + %22 (%25s) = %25s %5Cn%22, input, bytesTooHex(getHashValue(digest, input.getBytes())));%0A            // SHA-384%0A            digest = MessageDigest.getInstance(%22SHA-384%22);%0A            System.out.printf(digest.getAlgorithm() + %22 (%25s) = %25s %5Cn%22, input, bytesTooHex(getHashValue(digest, input.getBytes())));%0A            System.out.printf(digest.getAlgorithm() + %22 (%25s) = %25s %5Cn%22, input, bytesTooHex(getHashValue(digest, input.getBytes())));%0A            // SHA-512%0A            digest = MessageDigest.getInstance(%22SHA-512%22);%0A            System.out.printf(digest.getAlgorithm() + %22 (%25s) = %25s %5Cn%22, input, bytesTooHex(getHashValue(digest, input.getBytes())));%0A            System.out.printf(digest.getAlgorithm() + %22 (%25s) = %25s %5Cn%22, input, bytesTooHex(getHashValue(digest, input.getBytes())));%0A%0A%0A        %7D catch (NoSuchAlgorithmException e) %7B%0A            e.printStackTrace();%0A        %7D%0A%0A    %7D%0A%0A    public static byte%5B%5D getHashValue(MessageDigest digest, byte%5B%5D bytes) %7B%0A        digest.update(bytes, 0, bytes.length);%0A        return digest.digest();%0A    %7D%0A%0A    public static String bytesTooHex(byte%5B%5D hashValue) %7B%0A        System.out.println(%22Length of byte : %22 +hashValue.length);%0A        Formatter formatter = new Formatter();%0A        for (int i = 0; i %3C hashValue.length; i++) %7B%0A            formatter.format(%22%2502x%22, hashValue%5Bi%5D);%0A        %7D%0A%0A        return formatter.toString();%0A    %7D%0A%7D%0A

Add a cryptographic hash function main file