Ejemplo n.º 1
0
        /// <summary>
        /// Creates and fills obscured variable with raw encrypted value previously got from GetEncrypted().
        /// </summary>
        /// Literally does same job as SetEncrypted() but makes new instance instead of filling existing one,
        /// making it easier to initialize new variables from saved encrypted values.
        ///
        /// <param name="encrypted">Raw encrypted value you got from GetEncrypted().</param>
        /// <param name="key">Encryption key you've got from GetEncrypted().</param>
        /// <returns>New obscured variable initialized from specified encrypted value.</returns>
        /// \sa GetEncrypted(), SetEncrypted()
        public static ObscuredQuaternion FromEncrypted(RawEncryptedQuaternion encrypted, int key)
        {
            var instance = new ObscuredQuaternion();

            instance.SetEncrypted(encrypted, key);
            return(instance);
        }