Home | History | Annotate | Download | only in keystore

Lines Matching refs:entropy

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