tz-backend: Implement asymmetric operations
[platform/core/security/key-manager.git] / src / manager / common / data-type.h
index a322534..014869f 100644 (file)
@@ -1,5 +1,5 @@
 /*
- *  Copyright (c) 2000 - 2015 Samsung Electronics Co., Ltd All Rights Reserved
+ *  Copyright (c) 2000 - 2019 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.
 #pragma once
 
 #include <ckm/ckm-type.h>
-#include <dpl/exception.h>
+#include <exception.h>
 #include <symbol-visibility.h>
 
 namespace CKM {
 
 class COMMON_API DataType {
 public:
-       class Exception {
-       public:
-               DECLARE_EXCEPTION_TYPE(CKM::Exception, Base)
-               DECLARE_EXCEPTION_TYPE(Base, OutOfRange)
-       };
 
        enum Type {
                KEY_RSA_PUBLIC,
@@ -45,7 +40,6 @@ public:
                KEY_AES,
                CERTIFICATE,
                BINARY_DATA,
-
                CHAIN_CERT_0,
                CHAIN_CERT_1,
                CHAIN_CERT_2,
@@ -76,7 +70,6 @@ public:
        DataType(Type data);
        explicit DataType(int data);
        explicit DataType(KeyType key);
-       explicit DataType(AlgoType algorithmType);
        DataType(const DataType &) = default;
        DataType &operator=(const DataType &) = default;
 
@@ -91,6 +84,7 @@ public:
        bool isKeyPublic() const;
        bool isCertificate() const;
        bool isBinaryData() const;
+       bool isEllipticCurve() const;
 
        static bool isInRange(int data);
        static DataType getChainDatatype(unsigned int index);