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);
        }
Esempio n. 3
0
        public void ValidateCreateFormatter()
        {
            AsymmetricSignatureFormatter formatter = CreateFormatter(GostECDsa256.Create());

            Assert.NotNull(formatter);
            Assert.True(formatter is GostECDsa256SignatureFormatter);
        }
Esempio n. 4
0
        /// <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;
        }
Esempio n. 5
0
        /// <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;
        }