Sha256: feaa24eb82293edb5cf7a3d70b27f61344474211013007ccb90d6afab618aa45

Contents?: true

Size: 273 Bytes

Versions: 4

Compression:

Stored size: 273 Bytes

Contents

require "digest"
require "zlib"

class Digest::CRC32 < Digest::Class
  include Digest::Instance

  def initialize
    reset
  end

  def reset
    @crc32 = 0
  end

  def update(str)
    @crc32 = Zlib.crc32(str, @crc32)
  end

  def finish
    [@crc32].pack("N")
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
carthage_remote_cache-0.0.13 lib/crc32.rb
carthage_remote_cache-0.0.12 lib/crc32.rb
carthage_remote_cache-0.0.11 lib/crc32.rb
carthage_remote_cache-0.0.10 lib/crc32.rb