Skip to content

Commit 42a36fa

Browse files
author
Chris Hunt
committed
Don't use intermediate OpenSSL::Digest
cc @tmm1
1 parent 57108ed commit 42a36fa

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

lib/html/pipeline/camo_filter.rb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,7 @@ def asset_proxy_url(url)
5656

5757
# Private: calculate the HMAC digest for a image source URL.
5858
def asset_url_hash(url)
59-
digest = OpenSSL::Digest.new('sha1')
60-
OpenSSL::HMAC.hexdigest(digest, asset_proxy_secret_key, url)
59+
OpenSSL::HMAC.hexdigest('sha1', asset_proxy_secret_key, url)
6160
end
6261

6362
# Private: Return true if asset proxy filter should be enabled

0 commit comments

Comments
 (0)