public static HmacSha256Mac Decode(IByteReader stream)
 {
     HmacSha256Mac decodedHmacSha256Mac = new HmacSha256Mac();
     int macsize = 32;
     decodedHmacSha256Mac.Mac = XdrEncoding.ReadFixOpaque(stream, (uint)macsize);
     return decodedHmacSha256Mac;
 }
Esempio n. 2
0
        public static HmacSha256Mac Decode(IByteReader stream)
        {
            HmacSha256Mac decodedHmacSha256Mac = new HmacSha256Mac();
            int           macsize = 32;

            decodedHmacSha256Mac.Mac = XdrEncoding.ReadFixOpaque(stream, (uint)macsize);
            return(decodedHmacSha256Mac);
        }
Esempio n. 3
0
 public static AuthenticatedMessageV0 Decode(XdrDataInputStream stream)
 {
     var decodedAuthenticatedMessageV0 = new AuthenticatedMessageV0();
     decodedAuthenticatedMessageV0.Sequence = Uint64.Decode(stream);
     decodedAuthenticatedMessageV0.Message = StellarMessage.Decode(stream);
     decodedAuthenticatedMessageV0.Mac = HmacSha256Mac.Decode(stream);
     return decodedAuthenticatedMessageV0;
 }
Esempio n. 4
0
            public static AuthenticatedMessageV0 Decode(IByteReader stream)
            {
                AuthenticatedMessageV0 decodedAuthenticatedMessageV0 = new AuthenticatedMessageV0();

                decodedAuthenticatedMessageV0.Sequence = Uint64.Decode(stream);
                decodedAuthenticatedMessageV0.Message  = StellarMessage.Decode(stream);
                decodedAuthenticatedMessageV0.Mac      = HmacSha256Mac.Decode(stream);
                return(decodedAuthenticatedMessageV0);
            }
Esempio n. 5
0
        public static HmacSha256Mac Decode(XdrDataInputStream stream)
        {
            var decodedHmacSha256Mac = new HmacSha256Mac();
            var macsize = 32;

            decodedHmacSha256Mac.Mac = new byte[macsize];
            stream.Read(decodedHmacSha256Mac.Mac, 0, macsize);
            return(decodedHmacSha256Mac);
        }
Esempio n. 6
0
 public static void Encode(IByteWriter stream, AuthenticatedMessageV0 encodedAuthenticatedMessageV0)
 {
     Uint64.Encode(stream, encodedAuthenticatedMessageV0.Sequence);
     StellarMessage.Encode(stream, encodedAuthenticatedMessageV0.Message);
     HmacSha256Mac.Encode(stream, encodedAuthenticatedMessageV0.Mac);
 }
Esempio n. 7
0
 public static void Encode(XdrDataOutputStream stream, AuthenticatedMessageV0 encodedAuthenticatedMessageV0)
 {
     Uint64.Encode(stream, encodedAuthenticatedMessageV0.Sequence);
     StellarMessage.Encode(stream, encodedAuthenticatedMessageV0.Message);
     HmacSha256Mac.Encode(stream, encodedAuthenticatedMessageV0.Mac);
 }
 public static void Encode(IByteWriter stream, HmacSha256Mac encodedHmacSha256Mac) {
   int macsize = encodedHmacSha256Mac.Mac.Length;
   XdrEncoding.WriteFixOpaque(stream, (uint)macsize, encodedHmacSha256Mac.Mac);
 }
Esempio n. 9
0
        public static void Encode(XdrDataOutputStream stream, HmacSha256Mac encodedHmacSha256Mac)
        {
            var macsize = encodedHmacSha256Mac.Mac.Length;

            stream.Write(encodedHmacSha256Mac.Mac, 0, macsize);
        }
Esempio n. 10
0
        public static void Encode(IByteWriter stream, HmacSha256Mac encodedHmacSha256Mac)
        {
            int macsize = encodedHmacSha256Mac.Mac.Length;

            XdrEncoding.WriteFixOpaque(stream, (uint)macsize, encodedHmacSha256Mac.Mac);
        }