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