Client.cs

The definition of the NiP.Client class

// ------------------------------------------------------------------------------------------
// <copyright file="Client.cs" company="Pointsharp AB">
//   Pointsharp AB
// </copyright>
// <summary>
//   Defines the Client partial class.
// </summary>
// ------------------------------------------------------------------------------------------

namespace SecMaker.NiP.Client
{
	public partial class Client
	{


        public void SetServerUrl(string url)
		{
			_sUrl = url;
		}

		public void SetMessage(string message)
		{
			_sMessage = message;
		}

        //Size in bits
        public void SetSymmetricalKeySize(int size)
        {
            _symmetricalKeySize = size;
        }
        public int GetSymmetricalKeySize()
        {
            return _symmetricalKeySize;
        }

        public void SetCertificateHash(string hash)
		{
			_sCertHash = hash;
		}

		public void SetHashAlgorithm(string alg)
		{
			_sHashAlg = alg;
		}

		public void SetCompressionMode(string mode)
		{
			_sCompressionMode = mode;
		}
        public void SetBlobFormat(string format)
        {
            _sBlobFormat = format;
        }

        public void SetClientNonce(byte[] nonce)
		{
			_cltNonce = nonce;
		}

		public void SetServerNonce(byte[] nonce)
		{
			_srvNonce = nonce;
		}

		public void SetDateTimeKey(byte[] key)
		{
			_dateTimeKey = key;
		}

		public void SetCounter(int counter)
		{
			_counter = counter;
		}

		public string GetSessionId()
		{
			return _sSessionId;
		}

		public byte[] GetClientNonce()
		{
			return _cltNonce;
		}

		public byte[] GetServerNonce()
		{
			return _srvNonce;
		}

		public byte[] GetDateTimeKey()
		{
			return _dateTimeKey;
		}
        public string GetBlobFormat()
        {
            return _sBlobFormat;
        }
        public int GetCounter()
		{
			return _counter;
		}

        private int _symmetricalKeySize;
		private string _sUrl;
		private string _sCertHash;
		private string _sHashAlg;
		private string _sCompressionMode;
        private string _sBlobFormat;
		private string _sMessage;
		private string _sSessionId;
		private byte[] _dateTimeKey;
		private byte[] _cltNonce;
		private byte[] _srvNonce;
		private byte[] _key;
		private byte[] _iv;
		private int _counter;
        private bool _encryptionDisabled;

    }
}