lib/rbnacl/hmac/sha256.rb in rbnacl-1.0.0 vs lib/rbnacl/hmac/sha256.rb in rbnacl-1.1.0

- old
+ new

@@ -17,9 +17,16 @@ KEYBYTES = NaCl::HMACSHA256_KEYBYTES # Number of bytes in a valid authenticator BYTES = NaCl::HMACSHA256_BYTES + # The crypto primitive for the HMAC::SHA256 class + # + # @return [Symbol] The primitive used + def self.primitive + :hmac_sha256 + end + private def compute_authenticator(message, authenticator) NaCl.crypto_auth_hmacsha256(authenticator, message, message.bytesize, key) end