Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- require 'digest/sha1'
- # this patch fixes SHA1#update on OSX
- class Digest::SHA1
- def update s
- buf_size = 1024 ** 2
- if s.size > buf_size
- io = StringIO.new s
- buf = String.new
- super buf while io.read(buf_size, buf)
- else
- super s
- end
- end
- end
Add Comment
Please, Sign In to add comment