mirror of
https://github.com/emmansun/gmsm.git
synced 2025-10-14 07:10:45 +08:00
mlkem: use clear built-in
This commit is contained in:
parent
5591ee6602
commit
fb72bfe828
@ -206,9 +206,7 @@ func sliceForAppend(in []byte, n int) (head, tail []byte) {
|
||||
// followed by ByteEncode₁, according to FIPS 203, Algorithm 5.
|
||||
func ringCompressAndEncode1(s []byte, f ringElement) []byte {
|
||||
s, b := sliceForAppend(s, encodingSize1)
|
||||
for i := range b {
|
||||
b[i] = 0
|
||||
}
|
||||
clear(b)
|
||||
for i := range f {
|
||||
b[i/8] |= uint8(compress(f[i], 1) << (i % 8))
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user