func (s *hashFunc) update(block *[4]uint64) { threefish.IncrementTweak(&(s.tweak), threefish.BlockSize256) threefish.UBI256(block, &(s.hVal), &(s.tweak)) s.tweak[1] &^= skein.FirstBlock }
func (s *hashFunc) update(block *[8]uint64) { threefish.IncrementTweak(&(s.tweak), BlockSize) threefish.UBI512(block, &(s.hVal), &(s.tweak)) s.tweak[1] &^= FirstBlock }
func (s *hashFunc) finalizeHash() { threefish.IncrementTweak(&(s.tweak), uint64(s.off)) s.tweak[1] |= skein.FinalBlock // set the last block flag for i := s.off; i < len(s.block); i++ { s.block[i] = 0 } s.off = 0 var block [4]uint64 bytesToBlock(&block, s.block[:]) threefish.UBI256(&block, &(s.hVal), &(s.tweak)) }
func (s *hashFunc) finalizeHash() { threefish.IncrementTweak(&(s.tweak), uint64(s.off)) s.tweak[1] |= FinalBlock for i := s.off; i < len(s.block); i++ { s.block[i] = 0 } s.off = 0 var block [8]uint64 bytesToBlock(&block, s.block[:]) threefish.UBI512(&block, &(s.hVal), &(s.tweak)) }