Replace 'virtual' with 'override' in TZ Store
[platform/core/security/key-manager.git] / src / manager / crypto / tz-backend / store.h
index ee5d24b..28b5557 100644 (file)
@@ -1,5 +1,5 @@
 /*
- *  Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved
+ *  Copyright (c) 2015 - 2021 Samsung Electronics Co., Ltd All Rights Reserved
  *
  *  Licensed under the Apache License, Version 2.0 (the "License");
  *  you may not use this file except in compliance with the License.
  */
 /*
  * @file       store.h
- * @author     BartÅ‚omiej Grzelewski (b.grzelewski@samsung.com)
+ * @author     Lukasz Kostyra (l.kostyra@samsung.com)
  * @version    1.0
  */
 #pragma once
 
-#include <generic-backend/gkey.h>
+#include <generic-backend/gobj.h>
 #include <generic-backend/gstore.h>
 
 namespace CKM {
@@ -29,15 +29,29 @@ namespace TZ {
 
 class Store : public GStore {
 public:
-    explicit Store(CryptoBackend backendId);
+       explicit Store(CryptoBackend backendId);
 
-    virtual GKeyUPtr getKey(const Token &token);
-    virtual TokenPair generateAKey(const CryptoAlgorithm &);
-    virtual Token import(DataType dataType, const RawBuffer &buffer);
-    virtual void destroy(const Token &){}
+       GObjUPtr getObject(const Token &, const Password &) override;
+       TokenPair generateAKey(const CryptoAlgorithm &,
+                                                  const Password &,
+                                                  const Password &,
+                                                  const RawBuffer &,
+                                                  const RawBuffer &) override;
+       Token generateSKey(const CryptoAlgorithm &,
+                                          const Password &,
+                                          const RawBuffer &) override;
+       Token import(const Data &, const Password &, const EncryptionParams &,
+                                const RawBuffer &) override;
+       void destroy(const Token &) override;
+
+       static RawBuffer pack(const RawBuffer &keyId,
+                                                 const Password &pwd,
+                                                 const RawBuffer &iv,
+                                                 const RawBuffer &tag);
+
+       // TODO device key ID is needed here to support importEncrypted
 };
 
 } // namespace TZ
 } // namespace Crypto
 } // namespace CKM
-