Class CRCGenerator
java.lang.Object
org.exoplatform.services.jcr.ext.artifact.CRCGenerator
Created by The eXo Platform SAS.
Date: 21 Nov 2008
Date: 21 Nov 2008
- Version:
- $Id: CheckSumGenerator.java
- Author:
- Dmytro Katayev
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringgetChecksum(InputStream in, String algo) Generates checksum for the InputStream.
-
Constructor Details
-
CRCGenerator
public CRCGenerator()
-
-
Method Details
-
getChecksum
public static String getChecksum(InputStream in, String algo) throws NoSuchAlgorithmException, IOException Generates checksum for the InputStream.- Parameters:
in- stream to generate CheckSumalgo- 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:
NoSuchAlgorithmExceptionIOException
-