github.com/adhithyan15/coding-adventures/code/packages/go/sha256 v0.0.0-20260903045604-07aafd4bd8bd
Source references XOR syntaxSHA-256 empty-input digest literal
SHA-256b125e8a01d7fd408c292e64c1d42145c8f58b2c7e1dac8981161f9602fdf6347
MaleculeH(Db₂)Md₂(BkPa)
Evidence
29:10… ([]byte("abc")) = ba7816bf...f20015ad
30package sha256
31
32import (
33 "encoding/binary"
34 "encoding/hex"
35)
36
37// === Initialization Constants ================================================
38//
39// Eight 32-bit words derived from the …
111:51… etween y and z.
112func ch(x, y, z uint32) uint32 {
113 return (x & y) ^ (^x & z)
114}
115
116// maj is the Majority function: output is 1 if at least 2 of 3 inputs are 1.
117//
118// Ensures that even if one variabl …
244:42… ])
245 }
246 var digest [32]byte
247 for i, w := range state {
248 binary.BigEndian.PutUint32(digest[i*4:], w)
249 }
250 return rf.Generate(true, false, digest)
⋯5 lines
261:38… ))
262 digest := Sum256(data)
263 return rf.Generate(true, false, hex.EncodeToString(digest[:]))
264 }).GetResult()
265 return result
⋯4 lines
362:9… e: d.state,
363 byteCount: d.byteCount,
364 }
365 other.buf = make([]byte, len(d.buf))
366 copy(other.buf, d.buf)
367 return rf.Generate(true, false, other)
368 }).GetResult()
369 return result
370}
No evidence locations were recorded for this file. Raw result