Write() public method

Writes INTEGER data into internal buffer.
public Write ( BigInteger data ) : void
data BigInteger BigInteger data to write.
return void
        /// <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();
        }
Example #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.");
 }
Example #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.");
 }