Class CRCGenerator


  • public class CRCGenerator
    extends Object
    Created by The eXo Platform SAS.
    Date: 21 Nov 2008
    Version:
    $Id: CheckSumGenerator.java
    Author:
    Dmytro Katayev
    • Constructor Detail

      • CRCGenerator

        public CRCGenerator()
    • Method Detail

      • getChecksum

        public static String getChecksum​(InputStream in,
                                         String algo)
                                  throws NoSuchAlgorithmException,
                                         IOException
        Generates checksum for the InputStream.
        Parameters:
        in - stream to generate CheckSum
        algo - algorithm name according to the <a href= "http://java.sun.com/j2se/1.4.2/docs/guide/security/CryptoSpec.html#AppA"> Java Cryptography Architecture API Specification & Reference </a>
        Returns:
        hexadecimal string checksun representation
        Throws:
        NoSuchAlgorithmException
        IOException