Refactor KeyBlob to separate encryption functionality.
This CL is in preparation for another which will refactor libkeymaster
into libkeymaster and libkeymasterclient, the latter for use by programs
which merely interface with keymaster and don't do any crypto on their
own, but do need to parse key blobs to extract authorization list
entries. To make that possible it moves KeyBlob's key encryption and
decryption capabilities into a subclass, PlaintextKeyBlob.
Change-Id: Ic6a65b6f237c122796ea70458655111316f902d8
diff --git a/key.h b/key.h
index 5fd824f..982367f 100644
--- a/key.h
+++ b/key.h
@@ -25,10 +25,12 @@
class KeyBlob;
class Operation;
+class UnencryptedKeyBlob;
class Key {
public:
- static Key* CreateKey(const KeyBlob& blob, const Logger& logger, keymaster_error_t* error);
+ static Key* CreateKey(const UnencryptedKeyBlob& blob, const Logger& logger,
+ keymaster_error_t* error);
static Key* GenerateKey(const AuthorizationSet& key_description, const Logger& logger,
keymaster_error_t* error);
static Key* ImportKey(const AuthorizationSet& key_description,