Exemplo n.º 1
0
        public void CreateFormatter_CreatesValidFormatter()
        {
            var formatter = CreateFormatter(GostECDsa512.Create());

            Assert.NotNull(formatter);
            Assert.True(formatter is GostECDsa512SignatureFormatter);
        }
Exemplo n.º 2
0
        public void CreateDeformatter_CreatesValidDeformatter()
        {
            var deformatter = CreateDeformatter(GostECDsa512.Create());

            Assert.NotNull(deformatter);
            Assert.True(deformatter is GostECDsa512SignatureDeformatter);
        }
Exemplo n.º 3
0
        public void ValidateCreateFormatter()
        {
            AsymmetricSignatureFormatter formatter = CreateFormatter(GostECDsa512.Create());

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