File tree 1 file changed +5
-4
lines changed
1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -118,7 +118,7 @@ public ZCert(byte[] publicKey, byte[] secretKey)
118
118
{
119
119
throw new InvalidOperationException ( "secret key length must be of length 32" ) ;
120
120
}
121
- Array . Copy ( secretKey , this . secretKey , 32 ) ;
121
+ Array . Copy ( publicKey , this . publicKey , 32 ) ;
122
122
Array . Copy ( secretKey , this . secretKey , 32 ) ;
123
123
124
124
publicTxt = Encoding . UTF8 . GetString ( Z85 . Encode ( publicKey ) ) . ToCharArray ( ) ;
@@ -145,8 +145,9 @@ public ZCert(string publicTxt, string secretTxt)
145
145
PublicTxt = publicTxt ;
146
146
SecretTxt = secretTxt ;
147
147
148
- publicKey = Z85 . EncodeBytes ( PublicTxt ) ;
149
- secretKey = Z85 . EncodeBytes ( SecretTxt ) ;
148
+ publicKey = Z85 . ToZ85DecodedBytes ( PublicTxt ) ;
149
+ secretKey = Z85 . ToZ85DecodedBytes ( SecretTxt ) ;
150
+
150
151
}
151
152
152
153
/// <summary>
@@ -204,7 +205,7 @@ public void Apply(ZSocket socket)
204
205
/// </summary>
205
206
/// <param name="cert">Certificate to deep clone. Public and private keys must not be null.</param>
206
207
/// <returns>A copy of the given certificate.</returns>
207
- public ZCert Dup ( ZCert cert )
208
+ public static ZCert Dup ( ZCert cert )
208
209
{
209
210
if ( cert == null )
210
211
return null ;
You can’t perform that action at this time.
0 commit comments