SecretManager constructor
SecretManager( - bool _secureStorageSet,
- bool _credentialSaved,
- String? _login
)
Implementation
SecretManager(this._secureStorageSet, this._credentialSaved,this._login){
if (_credentialSaved){
if (_login == null){
throw Exception("Credential should be saved on disk but username is null");
}
_password = _keyring.getPassword(_SERVICE_NAME, _login!);
_credentialLoaded = _password != null;
}
if (_secureStorageSet){
_secureStorageKey = _keyring.getPassword(_SECURE_SERVICE_NAME, _SECURE_SERVICE_USERNAME);
_secureStorageIV = _keyring.getPassword(_SECURE_SERVICE_IVNAME, _SECURE_SERVICE_IVUSERNAME);
_secureStorageLoaded = _secureStorageKey != null && _secureStorageIV != null;
}
}