update comment

This commit is contained in:
Sun Yimin 2022-08-19 10:30:19 +08:00 committed by GitHub
parent 6db1b23eb1
commit 45d6a74b6a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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)