2
0

nixio.CryptoHash.lua 541 B

1234567891011121314151617
  1. --- Cryptographical Hash and HMAC object.
  2. -- @cstyle instance
  3. module "nixio.CryptoHash"
  4. --- Add another chunk of data to be hashed.
  5. -- @class function
  6. -- @name CryptoHash.update
  7. -- @param chunk Chunk of data
  8. -- @return CryptoHash object (self)
  9. --- Finalize the hash and return the digest.
  10. -- @class function
  11. -- @name CryptoHash.final
  12. -- @usage You cannot call update on a hash object that was already finalized
  13. -- you can however call final multiple times to get the digest.
  14. -- @return hexdigest
  15. -- @return buffer containing binary digest