Exemplo n.º 1
0
        public async Task <string> TryAlternativeLogin()
        {
            try
            {
                PasswordInfoModel model = await GetPasswordInfoModelAsync();

                if (model != null)
                {
                    var key = await GetSignedKeyAsync(model.KeyPhrase);

                    if (key != null)
                    {
                        if (model.EncryptedPassword != null)
                        {
                            var myPassword = _encryptionService.DecryptRaw(model.EncryptedPassword, key);
                            return(myPassword);
                        }
                    }
                }
            }
            catch (Exception e)
            {
                LogHelper.Instance.LogException(e);
            }
            return(null);
        }