File tree 1 file changed +22
-0
lines changed
1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -180,6 +180,17 @@ private NetMQCertificate(string keystr, bool isSecret)
180
180
PublicKey = key ;
181
181
}
182
182
183
+ /// <summary>
184
+ /// Create a certificate from secret key, public key is derived from the secret key
185
+ /// </summary>
186
+ /// <param name="secretKey">Secret Key</param>
187
+ /// <exception cref="ArgumentException">If secret key is not 32-bytes long</exception>
188
+ /// <returns>The newly created certificate</returns>
189
+ public static NetMQCertificate CreateFromSecretKey ( byte [ ] secretKey )
190
+ {
191
+ return new NetMQCertificate ( secretKey , true ) ;
192
+ }
193
+
183
194
/// <summary>
184
195
/// Create a certificate from secret key, public key is derived from the secret key
185
196
/// </summary>
@@ -191,6 +202,17 @@ public NetMQCertificate FromSecretKey(byte[] secretKey)
191
202
return new NetMQCertificate ( secretKey , true ) ;
192
203
}
193
204
205
+ /// <summary>
206
+ /// Create a certificate from secret key, public key is derived from the secret key
207
+ /// </summary>
208
+ /// <param name="secretKey">Secret Key</param>
209
+ /// <exception cref="ArgumentException">If secret key is not 40-chars long</exception>
210
+ /// <returns>The newly created certificate</returns>
211
+ public static NetMQCertificate CreateFromSecretKey ( string secretKey )
212
+ {
213
+ return new NetMQCertificate ( secretKey , true ) ;
214
+ }
215
+
194
216
/// <summary>
195
217
/// Create a certificate from secret key, public key is derived from the secret key
196
218
/// </summary>
You can’t perform that action at this time.
0 commit comments