2025-06-25 16:27:24 +02:00
|
|
|
package p521
|
|
|
|
|
|
|
|
|
|
import (
|
|
|
|
|
"testing"
|
|
|
|
|
|
2025-07-10 15:56:45 +02:00
|
|
|
"github.com/ucan-wg/go-did-it/crypto"
|
|
|
|
|
"github.com/ucan-wg/go-did-it/crypto/_testsuite"
|
2025-06-25 16:27:24 +02:00
|
|
|
)
|
|
|
|
|
|
|
|
|
|
var harness = testsuite.TestHarness[*PublicKey, *PrivateKey]{
|
|
|
|
|
Name: "p521",
|
|
|
|
|
GenerateKeyPair: GenerateKeyPair,
|
|
|
|
|
PublicKeyFromBytes: PublicKeyFromBytes,
|
|
|
|
|
PublicKeyFromPublicKeyMultibase: PublicKeyFromPublicKeyMultibase,
|
|
|
|
|
PublicKeyFromX509DER: PublicKeyFromX509DER,
|
|
|
|
|
PublicKeyFromX509PEM: PublicKeyFromX509PEM,
|
|
|
|
|
PrivateKeyFromBytes: PrivateKeyFromBytes,
|
|
|
|
|
PrivateKeyFromPKCS8DER: PrivateKeyFromPKCS8DER,
|
|
|
|
|
PrivateKeyFromPKCS8PEM: PrivateKeyFromPKCS8PEM,
|
|
|
|
|
MultibaseCode: MultibaseCode,
|
2025-07-08 12:57:06 +02:00
|
|
|
DefaultHash: crypto.SHA512,
|
|
|
|
|
OtherHashes: []crypto.Hash{crypto.SHA384},
|
2025-06-25 16:27:24 +02:00
|
|
|
PublicKeyBytesSize: PublicKeyBytesSize,
|
|
|
|
|
PrivateKeyBytesSize: PrivateKeyBytesSize,
|
|
|
|
|
SignatureBytesSize: SignatureBytesSize,
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func TestSuite(t *testing.T) {
|
|
|
|
|
testsuite.TestSuite(t, harness)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func BenchmarkSuite(b *testing.B) {
|
|
|
|
|
testsuite.BenchSuite(b, harness)
|
|
|
|
|
}
|