/// <summary>
        /// Encodes hash using DER.
        /// </summary>
        /// <param name="hashData">The hash data.</param>
        /// <returns>DER Encoded byte array</returns>
        protected byte[] DerEncode(byte[] hashData)
        {
            var alg = new DerData();

            alg.Write(_oid);
            alg.WriteNull();

            var data = new DerData();

            data.Write(alg);
            data.Write(hashData);
            return(data.Encode());
        }
예제 #2
0
        public void WriteTest1()
        {
            DerData target = new DerData(); // TODO: Initialize to an appropriate value
            uint    data   = 0;             // TODO: Initialize to an appropriate value

            target.Write(data);
            Assert.Inconclusive("A method that does not return a value cannot be verified.");
        }
예제 #3
0
        public void WriteTest4()
        {
            DerData          target     = new DerData();          // TODO: Initialize to an appropriate value
            ObjectIdentifier identifier = new ObjectIdentifier(); // TODO: Initialize to an appropriate value

            target.Write(identifier);
            Assert.Inconclusive("A method that does not return a value cannot be verified.");
        }