# Module `onionr.onionrcrypto.hashers`

Source code

    import hashlib, nacl.hash
    def sha3_hash(data):
        try:
            data = data.encode()
        except AttributeError:
            pass
        hasher = hashlib.sha3_256()
        hasher.update(data)
        return hasher.hexdigest()

    def blake2b_hash(data):
        try:
            data = data.encode()
        except AttributeError:
            pass
        return nacl.hash.blake2b(data)

## Functions

`def blake2b_hash(data)`
  Source code

      def blake2b_hash(data):
          try:
              data = data.encode()
          except AttributeError:
              pass
          return nacl.hash.blake2b(data)

`def sha3_hash(data)`
  Source code

      def sha3_hash(data):
          try:
              data = data.encode()
          except AttributeError:
              pass
          hasher = hashlib.sha3_256()
          hasher.update(data)
          return hasher.hexdigest()