public void CreateFormatter_CreatesValidFormatter() { var formatter = CreateFormatter(GostECDsa512.Create()); Assert.NotNull(formatter); Assert.True(formatter is GostECDsa512SignatureFormatter); }
public void CreateDeformatter_CreatesValidDeformatter() { var deformatter = CreateDeformatter(GostECDsa512.Create()); Assert.NotNull(deformatter); Assert.True(deformatter is GostECDsa512SignatureDeformatter); }
public void ValidateCreateFormatter() { AsymmetricSignatureFormatter formatter = CreateFormatter(GostECDsa512.Create()); Assert.NotNull(formatter); Assert.True(formatter is GostECDsa512SignatureFormatter); }
/// <summary> /// Initializes a new instance of the <see cref="GostECDsa512SignatureFormatter"/> class with the specified key. /// </summary> /// <param name="key"> /// The instance of <see cref="GostECDsa512"/> that holds the key. /// </param> /// <exception cref="ArgumentNullException"> /// <paramref name="key"/> is <c>null</c>. /// </exception> public GostECDsa512SignatureFormatter(AsymmetricAlgorithm key) { if (key == null) { throw new ArgumentNullException(nameof(key)); } _key = (GostECDsa512)key; }
/// <summary> /// Specifies the key to be used for the <see cref="GostECDsa512"/> signature formatter. /// </summary> /// <param name="key"> /// The instance of <see cref="GostECDsa512"/> that holds the key. /// </param> /// <exception cref="ArgumentNullException"> /// <paramref name="key"/> is <c>null</c>. /// </exception> public override void SetKey(AsymmetricAlgorithm key) { if (key == null) { throw new ArgumentNullException(nameof(key)); } _key = (GostECDsa512)key; }