// New returns a new sha224 hash.Hash func New224() hash.Hash { hash := new(SHA224Hash) if C.SHA224_Init(&hash.sha) != 1 { panic("problem creating hash") } return hash }
func (d *digest) Reset() { if d.is224 { C.SHA224_Init(&d.ctx) return } C.SHA256_Init(&d.ctx) }
func New224() hash.Hash { d := new(digest) d.is224 = true if C.SHA224_Init(&d.ctx) != 1 { return nil } return d }
func (self *SHA224Hash) Reset() { C.SHA224_Init(&self.sha) }
func (h *sha224) Reset() { if C.SHA224_Init(&h.ctx) != 1 { panic("SHA224_Init failed") // hash funcs shouldn't fail } }