14
14
import org .junit .jupiter .params .provider .MethodSource ;
15
15
16
16
import com .apicatalog .did .key .DidKey ;
17
- import com .apicatalog .multicodec .MulticodecRegistry ;
17
+ import com .apicatalog .multicodec .codec . KeyCodec ;
18
18
19
19
@ DisplayName ("DID Key" )
20
20
@ TestMethodOrder (OrderAnnotation .class )
@@ -54,77 +54,77 @@ static Stream<DidKeyTestCase> testVectors() {
54
54
static final DidKeyTestCase testCases [] = new DidKeyTestCase [] {
55
55
DidKeyTestCase .create (
56
56
"did:key:z6MkpTHR8VNsBxYAAWHut2Geadd9jSwuBV8xRoAnwWsdvktH" ,
57
- MulticodecRegistry .ED25519_PUBLIC_KEY ,
57
+ KeyCodec .ED25519_PUBLIC_KEY ,
58
58
32
59
59
),
60
60
DidKeyTestCase .create (
61
61
"did:key:z6MkiTBz1ymuepAQ4HEHYSF1H8quG5GLVVQR3djdX3mDooWp" ,
62
- MulticodecRegistry .ED25519_PUBLIC_KEY ,
62
+ KeyCodec .ED25519_PUBLIC_KEY ,
63
63
32
64
64
),
65
65
DidKeyTestCase .create (
66
66
"did:key:z6MkjchhfUsD6mmvni8mCdXHw216Xrm9bQe2mBH1P5RDjVJG" ,
67
- MulticodecRegistry .ED25519_PUBLIC_KEY ,
67
+ KeyCodec .ED25519_PUBLIC_KEY ,
68
68
32
69
69
),
70
70
DidKeyTestCase .create (
71
71
"did:key:z6MknGc3ocHs3zdPiJbnaaqDi58NGb4pk1Sp9WxWufuXSdxf" ,
72
- MulticodecRegistry .ED25519_PUBLIC_KEY ,
72
+ KeyCodec .ED25519_PUBLIC_KEY ,
73
73
32
74
74
),
75
75
DidKeyTestCase .create (
76
76
"did:key:z6MkicdicToW5HbxPP7zZV1H7RHvXgRMhoujWAF2n5WQkdd2" ,
77
- MulticodecRegistry .ED25519_PUBLIC_KEY ,
77
+ KeyCodec .ED25519_PUBLIC_KEY ,
78
78
32
79
79
),
80
80
DidKeyTestCase .create (
81
81
"did:key:z6MkiVQTYk3L2XKY6yg6MyeN2QLE5QkKcXByUeY1dkdiLx4j" ,
82
- MulticodecRegistry .ED25519_PUBLIC_KEY ,
82
+ KeyCodec .ED25519_PUBLIC_KEY ,
83
83
32
84
84
),
85
85
DidKeyTestCase .create (
86
86
"did:key:zQ3shokFTS3brHcDQrn82RUDfCZESWL1ZdCEJwekUDPQiYBme" ,
87
- MulticodecRegistry .SECP256K1_PUBLIC_KEY ,
87
+ KeyCodec .SECP256K1_PUBLIC_KEY ,
88
88
33
89
89
),
90
90
DidKeyTestCase .create (
91
91
"did:key:zQ3shtxV1FrJfhqE1dvxYRcCknWNjHc3c5X1y3ZSoPDi2aur2" ,
92
- MulticodecRegistry .SECP256K1_PUBLIC_KEY ,
92
+ KeyCodec .SECP256K1_PUBLIC_KEY ,
93
93
33
94
94
),
95
95
DidKeyTestCase .create (
96
96
"did:key:zQ3shZc2QzApp2oymGvQbzP8eKheVshBHbU4ZYjeXqwSKEn6N" ,
97
- MulticodecRegistry .SECP256K1_PUBLIC_KEY ,
97
+ KeyCodec .SECP256K1_PUBLIC_KEY ,
98
98
33
99
99
),
100
100
DidKeyTestCase .create (
101
101
"did:key:zDnaerDaTF5BXEavCrfRZEk316dpbLsfPDZ3WJ5hRTPFU2169" ,
102
- MulticodecRegistry .P256_PUBLIC_KEY ,
102
+ KeyCodec .P256_PUBLIC_KEY ,
103
103
33
104
104
),
105
105
DidKeyTestCase .create (
106
106
"did:key:zDnaerx9CtbPJ1q36T5Ln5wYt3MQYeGRG5ehnPAmxcf5mDZpv" ,
107
- MulticodecRegistry .P256_PUBLIC_KEY ,
107
+ KeyCodec .P256_PUBLIC_KEY ,
108
108
33
109
109
),
110
110
DidKeyTestCase .create (
111
111
"did:key:z82Lm1MpAkeJcix9K8TMiLd5NMAhnwkjjCBeWHXyu3U4oT2MVJJKXkcVBgjGhnLBn2Kaau9" ,
112
- MulticodecRegistry .P384_PUBLIC_KEY ,
112
+ KeyCodec .P384_PUBLIC_KEY ,
113
113
49
114
114
),
115
115
DidKeyTestCase .create (
116
116
"did:key:z82LkvCwHNreneWpsgPEbV3gu1C6NFJEBg4srfJ5gdxEsMGRJUz2sG9FE42shbn2xkZJh54" ,
117
- MulticodecRegistry .P384_PUBLIC_KEY ,
117
+ KeyCodec .P384_PUBLIC_KEY ,
118
118
49
119
119
),
120
120
DidKeyTestCase .create (
121
121
"did:key:z2J9gaYxrKVpdoG9A4gRnmpnRCcxU6agDtFVVBVdn1JedouoZN7SzcyREXXzWgt3gGiwpoHq7K68X4m32D8HgzG8wv3sY5j7" ,
122
- MulticodecRegistry .P521_PUBLIC_KEY ,
122
+ KeyCodec .P521_PUBLIC_KEY ,
123
123
67
124
124
),
125
125
DidKeyTestCase .create (
126
126
"did:key:z2J9gcGdb2nEyMDmzQYv2QZQcM1vXktvy1Pw4MduSWxGabLZ9XESSWLQgbuPhwnXN7zP7HpTzWqrMTzaY5zWe6hpzJ2jnw4f" ,
127
- MulticodecRegistry .P521_PUBLIC_KEY ,
127
+ KeyCodec .P521_PUBLIC_KEY ,
128
128
67
129
129
),
130
130
@@ -136,13 +136,13 @@ static Stream<DidKeyTestCase> testVectors() {
136
136
// versioned keys
137
137
DidKeyTestCase .create (
138
138
"did:key:1.1:z6MkicdicToW5HbxPP7zZV1H7RHvXgRMhoujWAF2n5WQkdd2" ,
139
- MulticodecRegistry .ED25519_PUBLIC_KEY ,
139
+ KeyCodec .ED25519_PUBLIC_KEY ,
140
140
32 ,
141
141
"1.1"
142
142
),
143
143
DidKeyTestCase .create (
144
144
"did:key:0.7:z6MkicdicToW5HbxPP7zZV1H7RHvXgRMhoujWAF2n5WQkdd2" ,
145
- MulticodecRegistry .ED25519_PUBLIC_KEY ,
145
+ KeyCodec .ED25519_PUBLIC_KEY ,
146
146
32 ,
147
147
"0.7"
148
148
),
0 commit comments