mirror of
https://github.com/emmansun/gmsm.git
synced 2025-04-26 20:26:19 +08:00
update comment
This commit is contained in:
parent
6db1b23eb1
commit
45d6a74b6a
@ -69,7 +69,7 @@ const p256CompressedLength = 1 + p256ElementLength
|
|||||||
|
|
||||||
// toElementArray, convert slice of bytes to pointer to [32]byte.
|
// toElementArray, convert slice of bytes to pointer to [32]byte.
|
||||||
// This function is required for low version of golang, can type cast directly
|
// This function is required for low version of golang, can type cast directly
|
||||||
// since golang 1.18.
|
// since golang 1.17.
|
||||||
func toElementArray(b []byte) *[32]byte {
|
func toElementArray(b []byte) *[32]byte {
|
||||||
tmpPtr := (*unsafe.Pointer)(unsafe.Pointer(&b))
|
tmpPtr := (*unsafe.Pointer)(unsafe.Pointer(&b))
|
||||||
return (*[32]byte)(*tmpPtr)
|
return (*[32]byte)(*tmpPtr)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user