Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Specify your own checksumming method #28

Open
awead opened this issue Feb 3, 2015 · 1 comment
Open

Specify your own checksumming method #28

awead opened this issue Feb 3, 2015 · 1 comment

Comments

@awead
Copy link
Contributor

awead commented Feb 3, 2015

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
Copy link
Member

mjgiarlo commented Feb 3, 2015

😺

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants