Class: GoogleSafeBrowsing::HashHelper
- Inherits:
-
Object
- Object
- GoogleSafeBrowsing::HashHelper
- Defined in:
- lib/google_safe_browsing/hash_helper.rb
Defined Under Namespace
Classes: GsbHash
Class Method Summary collapse
Class Method Details
.urls_to_hashes(urls) ⇒ Object
19 20 21 22 23 24 25 26 |
# File 'lib/google_safe_browsing/hash_helper.rb', line 19 def self.urls_to_hashes(urls) hashes = [] urls.each do |u| hash = ( Digest::SHA256.new << u ).to_s hashes << GsbHash.new(hash) end hashes end |