﻿
using System.Xml.Serialization;
using Newtonsoft.Json;

namespace SafeChat
{
    [JsonObject]
    public class MessageSessionKey : Message
    {

        public void Init(byte[] key, byte[] iv, int nonce) {
            Key = key;
            IV = iv;
            Nonce = nonce;
        }

        [XmlElement("key")]
        [JsonProperty(PropertyName = "key")]
        public byte[] Key {
            get;
            set;
        }

        [XmlElement("iv")]
        [JsonProperty(PropertyName = "iv")]
        public byte[] IV {
            get;
            set;
        }

        [XmlElement("nonce")]
        [JsonProperty(PropertyName = "nonce")]
        public int Nonce {
            get;
            set;
        }
    }
}
