#!/usr/bin/env python3

import hashlib


class Hash:
    def __init__(self):
        pass

    def hashMd5(self, f):
        md5 = hashlib.md5()
        with open(f, "rb") as data:
            md5.update(data.read())
        return md5.hexdigest()

    def hashSha1(self, f):
        sha1 = hashlib.sha1()
        with open(f, "rb") as data:
            sha1.update(data.read())
        return sha1.hexdigest()

    def hashSha256(self, f):
        sha256 = hashlib.sha256()
        with open(f, "rb") as data:
            sha256.update(data.read())
        return sha256.hexdigest()

    def hashSha384(self, f):
        sha384 = hashlib.sha384()
        with open(f, "rb") as data:
            sha384.update(data.read())
        return sha384.hexdigest()

    def hashSha512(self, f):
        sha512 = hashlib.sha512()
        with open(f, "rb") as data:
            sha512.update(data.read())
        return sha512.hexdigest()
