Sha256: 23dc5e154ce4c3cc5c37f40d4b771bff0dbe87778ae0683b4812942c2ff6e1e5
Contents?: true
Size: 301 Bytes
Versions: 1
Compression:
Stored size: 301 Bytes
Contents
require 'digest/stringbuffer' module Digest class Test < StringBuffer def initialize @prime = 31 end def finish result = 0 buffer.unpack("C*").each do |c| result += (c * @prime) end [result & 0xffffffff].pack("N") end end end include Digest
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
digest-stringbuffer-0.0.3 | spec/spec_helper.rb |