Beispiel #1
0
        /// <summary>
        /// Gets an encrypted server stamp.
        /// </summary>
        public static string GetServerStamp(long sessionID, byte[] secretKey)
        {
            byte[] bytes = secretKey == null
                ? BitConverter.GetBytes(sessionID)
                : ScadaUtils.EncryptBytes(BitConverter.GetBytes(sessionID), secretKey, CreateIV(sessionID));

            return(ScadaUtils.ComputeHash(bytes));
        }