Class FileHasherImpl


  • public class FileHasherImpl
    extends java.lang.Object
    This class resolves the hash of a file, using the SHA-256 algorithm, and an internal buffer of 8 KB.
    • Constructor Summary

      Constructors 
      Constructor Description
      FileHasherImpl()
      Builds a hasher using the SHA-256 algorithm.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String hash​(java.nio.file.Path inputFile)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • FileHasherImpl

        public FileHasherImpl()
                       throws java.security.NoSuchAlgorithmException
        Builds a hasher using the SHA-256 algorithm.
        Throws:
        java.security.NoSuchAlgorithmException - If the algorithm is not supported.
    • Method Detail

      • hash

        public java.lang.String hash​(java.nio.file.Path inputFile)
                              throws java.io.IOException
        Throws:
        java.io.IOException