summaryrefslogtreecommitdiff
path: root/ext/digest/lib
diff options
context:
space:
mode:
Diffstat (limited to 'ext/digest/lib')
-rw-r--r--ext/digest/lib/digest/hmac.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/digest/lib/digest/hmac.rb b/ext/digest/lib/digest/hmac.rb
index cdd537689c..0e3068b0c0 100644
--- a/ext/digest/lib/digest/hmac.rb
+++ b/ext/digest/lib/digest/hmac.rb
@@ -45,7 +45,7 @@ module Digest
block_len = @md.block_length
- if key.length > block_len
+ if key.bytesize > block_len
key = @md.digest(key)
end