?
本文檔使用 php中文網(wǎng)手冊 發(fā)布
import "hash/adler32"
概述
索引
Adler32 包實現(xiàn) Adler-32 校驗和。
它在RFC 1950中定義:
Adler-32 is composed of two sums accumulated per byte: s1 is the sum of all bytes, s2 is the sum of all s1 values. Both sums are done modulo 65521. s1 is initialized to 1, s2 to zero. The Adler-32 checksum is stored as s2*65536 + s1 in most-significant-byte first (network) order.
常量
func Checksum(data []byte) uint32
func New() hash.Hash32
adler32.go
Adler-32 校驗和的大?。ㄒ宰止?jié)為單位)。
const Size = 4
func Checksum(data []byte) uint32
校驗和返回數(shù)據(jù)的 Adler-32 校驗和。
func New() hash.Hash32
New 返回一個新的 hash.Hash32 ,用于計算 Adler-32 校驗和。它的 Sum 方法將以 big-endian 字節(jié)順序排列值。