File tree Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -21,5 +21,31 @@ public void X85()
21
21
Assert . Equal ( key . PublicKey , copy . PublicKey ) ;
22
22
}
23
23
}
24
+
25
+ [ Fact ]
26
+ public void FromPublicKey ( )
27
+ {
28
+ var key = new NetMQCertificate ( ) ;
29
+ var copy = NetMQCertificate . FromPublicKey ( key . PublicKeyZ85 ) ;
30
+
31
+ Assert . Null ( copy . SecretKeyZ85 ) ;
32
+ Assert . Equal ( key . PublicKeyZ85 , copy . PublicKeyZ85 ) ;
33
+
34
+ Assert . Null ( copy . SecretKey ) ;
35
+ Assert . Equal ( key . PublicKey , copy . PublicKey ) ;
36
+ }
37
+
38
+ [ Fact ]
39
+ public void FromSecretKey ( )
40
+ {
41
+ var key = new NetMQCertificate ( ) ;
42
+ var copy = new NetMQCertificate ( ) . FromSecretKey ( key . SecretKeyZ85 ) ;
43
+
44
+ Assert . Equal ( key . SecretKeyZ85 , copy . SecretKeyZ85 ) ;
45
+ Assert . Equal ( key . PublicKeyZ85 , copy . PublicKeyZ85 ) ;
46
+
47
+ Assert . Equal ( key . SecretKey , copy . SecretKey ) ;
48
+ Assert . Equal ( key . PublicKey , copy . PublicKey ) ;
49
+ }
24
50
}
25
51
}
You can’t perform that action at this time.
0 commit comments