示例#1
0
        /// <summary>
        /// Calculates key exchange hash value.
        /// </summary>
        /// <returns>
        /// Key exchange hash.
        /// </returns>
        protected override byte[] CalculateHash()
        {
            var hashData = new GroupExchangeHashData
            {
                ClientVersion      = Session.ClientVersion,
                ServerVersion      = Session.ServerVersion,
                ClientPayload      = ClientPayload,
                ServerPayload      = ServerPayload,
                HostKey            = HostKey,
                MinimumGroupSize   = MinimumGroupSize,
                PreferredGroupSize = PreferredGroupSize,
                MaximumGroupSize   = MaximumProupSize,
                Prime               = Prime,
                SubGroup            = Group,
                ClientExchangeValue = ClientExchangeValue,
                ServerExchangeValue = ServerExchangeValue,
                SharedKey           = SharedKey,
            }.GetBytes();

            return(Hash(hashData));
        }
        /// <summary>
        /// Calculates key exchange hash value.
        /// </summary>
        /// <returns>
        /// Key exchange hash.
        /// </returns>
        protected override byte[] CalculateHash()
        {
            var hashData = new GroupExchangeHashData
                {
                    ClientVersion = Session.ClientVersion,
                    ServerVersion = Session.ServerVersion,
                    ClientPayload = _clientPayload,
                    ServerPayload = _serverPayload,
                    HostKey = _hostKey,
                    MinimumGroupSize = MinimumGroupSize,
                    PreferredGroupSize = PreferredGroupSize,
                    MaximumGroupSize = MaximumProupSize,
                    Prime = _prime,
                    SubGroup = _group,
                    ClientExchangeValue = _clientExchangeValue,
                    ServerExchangeValue = _serverExchangeValue,
                    SharedKey = SharedKey,
                }.GetBytes();

            return Hash(hashData);
        }