this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

crypto: swap PrivateKeyP256 struct field orders to prevent accidental nil initialization

+2 -2
+2 -2
atproto/crypto/p256.go
··· 16 16 // Implements the [PrivateKeyExportable] and [PrivateKey] interfaces for the NIST P-256 / secp256r1 / ES256 cryptographic curve. 17 17 // Secret key material is naively stored in memory. 18 18 type PrivateKeyP256 struct { 19 - privP256 ecdsa.PrivateKey 20 19 privP256ecdh *ecdh.PrivateKey 20 + privP256 ecdsa.PrivateKey 21 21 } 22 22 23 23 // Implements the [PublicKey] interface for the NIST P-256 / secp256r1 / ES256 cryptographic curve. 24 24 type PublicKeyP256 struct { 25 - pubP256 ecdsa.PublicKey 26 25 pubP256ecdh ecdh.PublicKey 26 + pubP256 ecdsa.PublicKey 27 27 } 28 28 29 29 var _ PrivateKey = (*PrivateKeyP256)(nil)