module Shrine::Plugins::Signature::ClassMethods

  1. lib/shrine/plugins/signature.rb


Public Instance

  1. calculate_signature

Public Instance methods

calculate_signature (io, algorithm, format: :hex)

Calculates algorithm hash of the contents of the IO object, and encodes it into format.

[show source]
   # File lib/shrine/plugins/signature.rb
12 def calculate_signature(io, algorithm, format: :hex)
13   algorithm = algorithm.downcase # support uppercase algorithm names like :MD5
14, format: format).call(io)
15 end