Lines Matching refs:Entropy
339 class Entropy {
341 Entropy() : mRandom(-1) {}
342 ~Entropy() {
497 ResponseCode writeBlob(const char* filename, AES_KEY *aes_key, State state, Entropy* entropy) {
505 if (!entropy->generate_random_data(mBlob.vector, AES_BLOCK_SIZE)) {
683 ResponseCode initialize(const android::String8& pw, Entropy* entropy) {
684 if (!generateMasterKey(entropy)) {
687 ResponseCode response = writeMasterKey(pw, entropy);
695 ResponseCode writeMasterKey(const android::String8& pw, Entropy* entropy) {
701 return masterKeyBlob.writeBlob(mMasterKeyFile, &passwordAesKey, STATE_NO_ERROR, entropy);
704 ResponseCode readMasterKey(const android::String8& pw, Entropy* entropy) {
737 if (!generateSalt(entropy)) {
740 response = writeMasterKey(pw, entropy);
830 bool generateSalt(Entropy* entropy) {
831 return entropy->generate_random_data(mSalt, sizeof(mSalt));
834 bool generateMasterKey(Entropy* entropy) {
835 if (!entropy->generate_random_data(mMasterKey, sizeof(mMasterKey))) {
838 if (!generateSalt(entropy)) {
872 KeyStore(Entropy* entropy, keymaster_device_t* device)
873 : mEntropy(entropy)
1209 Entropy* mEntropy;
2332 Entropy entropy;
2333 if (!entropy.open()) {
2343 KeyStore keyStore(&entropy, dev);