Documentation
¶
Overview ¶
adler32パッケージはAdler-32チェックサムを実装しています。
これはRFC 1950で定義されています:
Adler-32はバイトごとに累積される2つの合計で構成されています: s1は すべてのバイトの合計で、s2はすべてのs1の値の合計です。両方の合計は 65521でモジュロ演算が行われます。s1は1で初期化され、s2はゼロです。Adler-32 チェックサムはs2*65536 + s1として、最も重要なバイトを最初に(ネットワークの)順序で格納されます。
Index ¶
Constants ¶
View Source
const Size = 4
Adler-32チェックサムのバイト単位のサイズ。
Variables ¶
This section is empty.
Functions ¶
func New ¶
NewはAdler-32チェックサムを計算する新しいhash.Hash32を返します。 Sumメソッドは値をビッグエンディアンのバイト順で配置します。 返されるHash32は、 encoding.BinaryMarshaler と encoding.BinaryUnmarshaler も実装しており、 ハッシュの内部状態をマーシャリングおよびアンマーシャリングすることができます。
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.