Replace 'virtual' with 'override' in TZ Store
[platform/core/security/key-manager.git] / src / manager / crypto / tz-backend / store.h
index bb61607..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.
@@ -15,7 +15,7 @@
  */
 /*
  * @file       store.h
- * @author     BartÅ‚omiej Grzelewski (b.grzelewski@samsung.com)
+ * @author     Lukasz Kostyra (l.kostyra@samsung.com)
  * @version    1.0
  */
 #pragma once
@@ -31,13 +31,25 @@ class Store : public GStore {
 public:
        explicit Store(CryptoBackend backendId);
 
-       virtual GObjUPtr getObject(const Token &, const Password &);
-       virtual TokenPair generateAKey(const CryptoAlgorithm &, const Password &,
-                                                                  const Password &);
-       virtual Token import(const Data &data, const Password &);
-       virtual Token importEncrypted(const Data &, const Password &,
-                                                                 const DataEncryption &);
-       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