summaryrefslogtreecommitdiff
path: root/keystore/blob.h
diff options
context:
space:
mode:
Diffstat (limited to 'keystore/blob.h')
-rw-r--r--keystore/blob.h11
1 files changed, 6 insertions, 5 deletions
diff --git a/keystore/blob.h b/keystore/blob.h
index 08ad18f..dc70709 100644
--- a/keystore/blob.h
+++ b/keystore/blob.h
@@ -24,11 +24,13 @@
#include <keystore/keymaster_types.h>
#include <keystore/keystore.h>
+#include <vector>
constexpr size_t kValueSize = 32768;
constexpr size_t kAesKeySize = 128 / 8;
constexpr size_t kGcmTagLength = 128 / 8;
constexpr size_t kGcmIvLength = 96 / 8;
+constexpr size_t kAes128KeySizeBytes = 128 / 8;
/* Here is the file format. There are two parts in blob.value, the secret and
* the description. The secret is stored in ciphertext, and its original size
@@ -83,8 +85,6 @@ typedef enum {
TYPE_MASTER_KEY_AES256 = 7,
} BlobType;
-class Entropy;
-
class Blob {
public:
Blob(const uint8_t* value, size_t valueLength, const uint8_t* info, uint8_t infoLength,
@@ -122,9 +122,10 @@ class Blob {
keystore::SecurityLevel getSecurityLevel() const;
void setSecurityLevel(keystore::SecurityLevel);
- ResponseCode writeBlob(const std::string& filename, const uint8_t* aes_key, State state,
- Entropy* entropy);
- ResponseCode readBlob(const std::string& filename, const uint8_t* aes_key, State state);
+ ResponseCode writeBlob(const std::string& filename, const std::vector<uint8_t>& aes_key,
+ State state);
+ ResponseCode readBlob(const std::string& filename, const std::vector<uint8_t>& aes_key,
+ State state);
private:
blobv3 mBlob;