Exemplo n.º 1
0
 /// <summary>
 ///     Exports the private component of the keypair as a DTO object.
 /// </summary>
 /// <returns>Private key as <see cref="ECKey"/> DTO.</returns>
 public ECKey GetPrivateKey()
 {
     return(new ECKey {
         PublicComponent = false,
         CurveProviderName = String.Copy(CurveProviderName),
         CurveName = String.Copy(CurveName),
         EncodedKey = EncodedPrivateKey.DeepCopy(),
         AdditionalData = AdditionalData.DeepCopy(),
         ConfirmationCanary = null
     });
 }
Exemplo n.º 2
0
 /// <summary>
 ///     Exports the public component of the keypair as a DTO.
 /// </summary>
 /// <returns>Public key as <see cref="ECKey"/> DTO.</returns>
 public ECKey ExportPublicKey()
 {
     return(new ECKey {
         PublicComponent = true,
         CurveProviderName = String.Copy(CurveProviderName),
         CurveName = String.Copy(CurveName),
         EncodedKey = EncodedPublicKey.DeepCopy(),
         AdditionalData = AdditionalData.DeepCopy(),
         ConfirmationCanary = ConfirmationCanary.DeepCopy()
     });
 }