Lines Matching refs:keymaster

108 static bool generateKeymasterKey(Keymaster& keymaster, const KeyAuthentication& auth,  in generateKeymasterKey()  argument
135 return keymaster.generateKey(paramsWithRollback, key) || in generateKeymasterKey()
136 keymaster.generateKey(paramBuilder, key); in generateKeymasterKey()
140 Keymaster keymaster; in generateWrappedStorageKey() local
141 if (!keymaster) return false; in generateWrappedStorageKey()
146 if (!keymaster.generateKey(paramBuilder, &key_temp)) return false; in generateWrappedStorageKey()
153 Keymaster keymaster; in exportWrappedStorageKey() local
154 if (!keymaster) return false; in exportWrappedStorageKey()
157 if (!keymaster.exportKey(kmKey, &key_temp)) return false; in exportWrappedStorageKey()
212 Keymaster keymaster; in deferedKmDeleteKey() local
213 if (!keymaster || !keymaster.deleteKey(kmkey)) { in deferedKmDeleteKey()
218 bool kmDeleteKey(Keymaster& keymaster, const std::string& kmKey) { in kmDeleteKey() argument
226 return keymaster.deleteKey(kmKey); in kmDeleteKey()
230 static KeymasterOperation begin(Keymaster& keymaster, const std::string& dir, in begin() argument
241 auto opHandle = keymaster.begin(purpose, kmKey, inParams, authToken, outParams); in begin()
248 if (!keymaster.upgradeKey(kmKey, keyParams, &newKey)) return KeymasterOperation(); in begin()
260 if (!kmDeleteKey(keymaster, kmKey)) { in begin()
269 static bool encryptWithKeymasterKey(Keymaster& keymaster, const std::string& dir, in encryptWithKeymasterKey() argument
275 auto opHandle = begin(keymaster, dir, km::KeyPurpose::ENCRYPT, keyParams, opParams, authToken, in encryptWithKeymasterKey()
297 static bool decryptWithKeymasterKey(Keymaster& keymaster, const std::string& dir, in decryptWithKeymasterKey() argument
306 auto opHandle = begin(keymaster, dir, km::KeyPurpose::DECRYPT, keyParams, opParams, authToken, in decryptWithKeymasterKey()
505 Keymaster keymaster; in storeKey() local
506 if (!keymaster) return false; in storeKey()
508 if (!generateKeymasterKey(keymaster, auth, appId, &kmKey)) return false; in storeKey()
513 if (!encryptWithKeymasterKey(keymaster, dir, keyParams, authToken, key, &encryptedKey, in storeKey()
564 Keymaster keymaster; in retrieveKey() local
565 if (!keymaster) return false; in retrieveKey()
569 if (!decryptWithKeymasterKey(keymaster, dir, keyParams, authToken, encryptedMessage, key, in retrieveKey()
581 Keymaster keymaster; in deleteKey() local
582 if (!keymaster) return false; in deleteKey()
583 if (!keymaster.deleteKey(kmKey)) return false; in deleteKey()