Пример #1
0
        /**
         * Return the byte encoding of the signature section.
         * @return uninterpreted signature bytes.
         */
        public byte[] GetSignatureBytes()
        {
            if (signatureEncoding != null)
            {
                return((byte[])signatureEncoding.Clone());
            }

            MemoryStream     bOut  = new MemoryStream();
            BcpgOutputStream bcOut = new BcpgOutputStream(bOut);

            foreach (MPInteger sigObj in signature)
            {
                try
                {
                    bcOut.WriteObject(sigObj);
                }
                catch (IOException e)
                {
                    throw new Exception("internal error: " + e);
                }
            }

            return(bOut.ToArray());
        }
Пример #2
0
 public abstract void Encode(BcpgOutputStream bcpgOut);
Пример #3
0
 public override void Encode(
     BcpgOutputStream bcpgOut)
 {
     bcpgOut.WriteObjects(p, q, g, y);
 }
Пример #4
0
 public override void Encode(
     BcpgOutputStream bcpgOut)
 {
     bcpgOut.WriteObject(x);
 }
Пример #5
0
 public override void Encode(
     BcpgOutputStream bcpgOut)
 {
     bcpgOut.WritePacket(PacketTag.SecretKey, GetEncodedContents(), true);
 }
Пример #6
0
 public override void Encode(
     BcpgOutputStream bcpgOut)
 {
     bcpgOut.WritePacket(PacketTag.Marker, marker, true);
 }
Пример #7
0
 public override void Encode(
     BcpgOutputStream bcpgOut)
 {
     bcpgOut.WritePacket(tag, contents, true);
 }
Пример #8
0
 public override void Encode(
     BcpgOutputStream bcpgOut)
 {
     bcpgOut.WritePacket(PacketTag.Trust, levelAndTrustAmount, true);
 }
Пример #9
0
 public override void Encode(
     BcpgOutputStream bcpgOut)
 {
     bcpgOut.WriteShort((short)val.BitLength);
     bcpgOut.Write(val.ToByteArrayUnsigned());
 }
Пример #10
0
 public override void Encode(
     BcpgOutputStream bcpgOut)
 {
     bcpgOut.WritePacket(PacketTag.UserId, idData, true);
 }
Пример #11
0
		public override void Encode(
            BcpgOutputStream bcpgOut)
        {
            bcpgOut.WritePacket(PacketTag.ModificationDetectionCode, digest, false);
        }