Project

mac

0.0
The project is in a healthy, maintained state
Enhances OpenSSL::HMAC with timestamp.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies

Runtime

>= 0
 Project Readme

Message Authentication Code (MAC) with SHA256 and signature

Available methods

Sign a message:

mac = Mac.sign message:, secret:
mac.timestamp # => 1779489515999
mac.signature # => 46f5297a94d0050ba6039bfcb12d6e4c1f955e39b34f98cf2bd5f9720b34ac49

Verify a signed message:

mac = Mac.new message:, secret:
mac.signed? signature:, timestamp: # true