예제 #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);
        }