Lines Matching refs:entropy
79 ResponseCode UserState::initialize(const android::String8& pw, Entropy* entropy) { in initialize() argument
80 if (!generateMasterKey(entropy)) { in initialize()
83 ResponseCode response = writeMasterKey(pw, entropy); in initialize()
133 ResponseCode UserState::writeMasterKey(const android::String8& pw, Entropy* entropy) { in writeMasterKey() argument
139 return masterKeyBlob.writeBlob(mMasterKeyFile, &passwordAesKey, STATE_NO_ERROR, entropy); in writeMasterKey()
142 ResponseCode UserState::readMasterKey(const android::String8& pw, Entropy* entropy) { in readMasterKey() argument
174 if (!generateSalt(entropy)) { in readMasterKey()
177 response = writeMasterKey(pw, entropy); in readMasterKey()
244 bool UserState::generateSalt(Entropy* entropy) { in generateSalt() argument
245 return entropy->generate_random_data(mSalt, sizeof(mSalt)); in generateSalt()
248 bool UserState::generateMasterKey(Entropy* entropy) { in generateMasterKey() argument
249 if (!entropy->generate_random_data(mMasterKey, sizeof(mMasterKey))) { in generateMasterKey()
252 if (!generateSalt(entropy)) { in generateMasterKey()