Exemplo n.º 1
0
        /// <summary>
        /// Use this simple encryption method to encrypt Vector2Int components, uses passed crypto key.
        /// </summary>
        public static RawEncryptedVector2Int Encrypt(int x, int y, int key)
        {
            if (key == 0)
            {
                key = cryptoKey;
            }

            RawEncryptedVector2Int result;

            result.x = ObscuredInt.Encrypt(x, key);
            result.y = ObscuredInt.Encrypt(y, key);

            return(result);
        }
Exemplo n.º 2
0
        private int InternalEncryptField(int encrypted)
        {
            var result = ObscuredInt.Encrypt(encrypted, cryptoKey);

            return(result);
        }