MCPcopy Create free account
hub / github.com/ICBNetwork/web3-Wallet / getGenericPassword

Function getGenericPassword

app/core/SecureKeychain.js:92–113  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

90 },
91
92 async getGenericPassword() {
93 if (instance) {
94 try {
95 instance.isAuthenticating = true;
96 const keychainObject = await Keychain.getGenericPassword(
97 defaultOptions,
98 );
99 if (keychainObject.password) {
100 const encryptedPassword = keychainObject.password;
101 const decrypted = await instance.decryptPassword(encryptedPassword);
102 keychainObject.password = decrypted.password;
103 instance.isAuthenticating = false;
104 return keychainObject;
105 }
106 instance.isAuthenticating = false;
107 } catch (error) {
108 instance.isAuthenticating = false;
109 throw new Error(error.message);
110 }
111 }
112 return null;
113 },
114
115 async setGenericPassword(password, type) {
116 const authOptions = {

Callers

nothing calls this directly

Calls 1

decryptPasswordMethod · 0.80

Tested by

no test coverage detected