mirror of
https://github.com/emmansun/gmsm.git
synced 2025-04-27 04:36:19 +08:00
avoid slice again
This commit is contained in:
parent
01063b1ff7
commit
c5982357d3
@ -12,7 +12,7 @@ import (
|
|||||||
func toBytes(curve elliptic.Curve, value *big.Int) []byte {
|
func toBytes(curve elliptic.Curve, value *big.Int) []byte {
|
||||||
byteLen := (curve.Params().BitSize + 7) >> 3
|
byteLen := (curve.Params().BitSize + 7) >> 3
|
||||||
result := make([]byte, byteLen)
|
result := make([]byte, byteLen)
|
||||||
value.FillBytes(result[:])
|
value.FillBytes(result)
|
||||||
return result
|
return result
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user