gems/pending/disk/modules/AzureBlobDisk.rb
# The maximum read length that supports MD5 return.
The maximum read length that supports MD5 return.
The maximum read length that supports MD5 return .
def blob_read(start_byte, length)
    options = {
      :start_byte => start_byte,
      :length     => length,
      :md5        => true
    }
    options[:date] = @snapshot if @snapshot
    ret = @storage_acct.get_blob_raw(@container, @blob, key, options)
    content_md5  = ret.headers[:content_md5].unpack("m0").first.unpack("H*").first
    returned_md5 = Digest::MD5.hexdigest(ret.body)
    raise "Checksum error: #{range_str}, blob: #{@container}/#{@blob}" unless content_md5 == returned_md5
    ret.body
  end
def blob_read ( start_byte , length ) options = { :start_byte => start_byte , :length => length , :md5 => true } options [ :date ] = @snapshot if @snapshot ret = @storage_acct . get_blob_raw ( @container , @blob , key , options ) content_md5 = ret . headers [ :content_md5 ] . unpack ( "m0" ) . first . unpack ( "H*" ) . first returned_md5 = Digest :: MD5 . hexdigest ( ret . body ) raise "Checksum error: #{range_str}, blob: #{@container}/#{@blob}" unless content_md5 == returned_md5 ret . body end
The maximum read length that supports MD5 return.
The maximum read length that supports MD5 return .
start_byte
<not_specific>
length
<not_specific>