From 80a79dacc58010d95e8367cec840677a1b58f884 Mon Sep 17 00:00:00 2001 From: Sun Yimin Date: Thu, 9 Nov 2023 08:46:44 +0800 Subject: [PATCH] fix bug #74 --- internal/sm2ec/sm2p256_asm.go | 8 -------- 1 file changed, 8 deletions(-) diff --git a/internal/sm2ec/sm2p256_asm.go b/internal/sm2ec/sm2p256_asm.go index 00ace0f..5efd1b6 100644 --- a/internal/sm2ec/sm2p256_asm.go +++ b/internal/sm2ec/sm2p256_asm.go @@ -68,14 +68,6 @@ const p256ElementLength = 32 const p256UncompressedLength = 1 + 2*p256ElementLength const p256CompressedLength = 1 + p256ElementLength -// (*[32]byte), convert slice of bytes to pointer to [32]byte. -// This function is required for low version of golang, can type cast directly -// since golang 1.17. -func (*[32]byte)(b []byte) *[32]byte { - tmpPtr := (*unsafe.Pointer)(unsafe.Pointer(&b)) - return (*[32]byte)(*tmpPtr) -} - // SetBytes sets p to the compressed, uncompressed, or infinity value encoded in // b, as specified in SEC 1, Version 2.0, Section 2.3.4. If the point is not on // the curve, it returns nil and an error, and the receiver is unchanged.