Exemplo n.º 1
0
        }                    // blank constructor needed for db initializer

        // constructor to easily set from NewUser type
        public Account(NewAccount newAcc, int uid)
        {
            UserID      = uid;
            Title       = HelperMethods.HexStringToByteArray(newAcc.Title);
            Login       = HelperMethods.HexStringToByteArray(newAcc.Login);
            Password    = HelperMethods.HexStringToByteArray(newAcc.Password);
            Url         = HelperMethods.HexStringToByteArray(newAcc.Url);
            Description = HelperMethods.HexStringToByteArray(newAcc.Description);
            FolderID    = newAcc.FolderID;
            IsFavorite  = false;
        }
Exemplo n.º 2
0
        }                    // blank constructor needed for db initializer

        // constructor to easily set from NewUser type
        public Account(NewAccount newAcc, int uid)
        {
            UserID      = uid;
            Title       = HelperMethods.EncryptStringToBytes_Aes(newAcc.Title, HelperMethods.GetUserKeyAndIV(uid));
            Login       = HelperMethods.EncryptStringToBytes_Aes(newAcc.Login, HelperMethods.GetUserKeyAndIV(uid));
            Password    = HelperMethods.EncryptStringToBytes_Aes(newAcc.Password, HelperMethods.GetUserKeyAndIV(uid));
            Url         = HelperMethods.EncryptStringToBytes_Aes(newAcc.Url, HelperMethods.GetUserKeyAndIV(uid));
            Description = HelperMethods.EncryptStringToBytes_Aes(newAcc.Description, HelperMethods.GetUserKeyAndIV(uid));
            FolderID    = newAcc.FolderID;
            IsFavorite  = false;
        }