samvera-labs / fedora-migrate

Gem for migrating content to Fedora4
Other
10 stars 7 forks source link

Specify your own checksumming method #28

Open awead opened 9 years ago

awead commented 9 years ago

Allow users to pass their own checksum method for datastream verification.

def has_matching_checksums?
  checksum(datastream) == target_checksum
end
def checksum content
  content.respond_to?(:checksum) ? content.checksum : Digest::SHA1.hexdigest(content)
end
mjgiarlo commented 9 years ago

:smiley_cat: