@@ -22,25 +22,25 @@ for await (const mod of sources) {
2222 }
2323}
2424
25- if ( vectors . sign ) vectors . verify = vectors . sign ;
26- if ( vectors . encrypt ) vectors . decrypt = vectors . encrypt ;
27-
28- if ( vectors . encrypt && vectors . exportKey ) {
29- for ( const enc of vectors . encrypt ) {
30- for ( const exp of vectors . exportKey ) {
31- vectors . wrapKey . push ( [ enc [ 0 ] && exp [ 0 ] , enc [ 1 ] , exp [ 1 ] ] ) ;
32- }
25+ vectors . verify = vectors . sign ;
26+ vectors . decrypt = vectors . encrypt ;
27+
28+ for ( const enc of vectors . encrypt ) {
29+ for ( const exp of vectors . exportKey ) {
30+ vectors . wrapKey . push ( [ enc [ 0 ] && exp [ 0 ] , enc [ 1 ] , exp [ 1 ] ] ) ;
3331 }
3432}
3533
36- if ( vectors . decrypt && vectors . importKey ) {
37- for ( const dec of vectors . decrypt ) {
38- for ( const imp of vectors . importKey ) {
39- vectors . unwrapKey . push ( [ dec [ 0 ] && imp [ 0 ] , dec [ 1 ] , imp [ 1 ] ] ) ;
40- }
34+ for ( const dec of vectors . decrypt ) {
35+ for ( const imp of vectors . importKey ) {
36+ vectors . unwrapKey . push ( [ dec [ 0 ] && imp [ 0 ] , dec [ 1 ] , imp [ 1 ] ] ) ;
4137 }
4238}
4339
40+ for ( const exportKey of vectors . exportKey ) {
41+ if ( ! exportKey [ 0 ] ) vectors . getPublicKey . push ( exportKey ) ;
42+ }
43+
4444for ( const operation of Object . keys ( vectors ) ) {
4545 for ( const [ expectation , ...args ] of vectors [ operation ] ) {
4646 assert . strictEqual (
0 commit comments