Replace internal encrypt/decrypt API with new start APIs 04/206304/3
authors414.kim <s414.kim@samsung.com>
Thu, 16 May 2019 06:14:51 +0000 (15:14 +0900)
committerKrzysztof Jackiewicz <k.jackiewicz@samsung.com>
Tue, 21 May 2019 14:00:46 +0000 (16:00 +0200)
- For the UX changes, it should be replaced
- The original encrypt/decrypt API will be invoked from stater

Change-Id: I002ae3779ef509a8553f71de08ed662d243a2bda
Signed-off-by: s414.kim <s414.kim@samsung.com>
ode/src/interface/internal/decrypt-device.cpp
ode/src/interface/internal/encrypt-device.cpp
ode/src/interface/tools/encryption.cpp
ode/src/interface/tools/encryption.h

index b89708a3faf3d2de27b0e40255e9510024c3e1f6..5d2cce2e23b59a63804432c59d46f56f81b6617c 100644 (file)
@@ -149,7 +149,7 @@ DecryptDeviceInterface::~DecryptDeviceInterface()
 
 void DecryptDeviceInterface::onConfirmed(const std::string &current)
 {
-       encryption.decrypt(current);
+       encryption.decrypt();
        ::sleep(2);
        dispose();
 }
index 3eaea55cf29f73ce5c1387935a80414a923e242c..f15dcf44a403cd9b62666ac23f8b9aa874d9947c 100644 (file)
@@ -235,7 +235,7 @@ EncryptDeviceInterface::~EncryptDeviceInterface()
 
 void EncryptDeviceInterface::onConfirmed(const std::string &current)
 {
-       encryption.encrypt(current, confirmPage->getOption());
+       encryption.encrypt(confirmPage->getOption());
        ::sleep(2);
        dispose();
 }
index 877b3043d8b294458d9b523d172bb5a140d79b9b..e7b67603ad32d11e3f84ca25b1ff5826cc5ae7e7 100644 (file)
@@ -25,20 +25,14 @@ InternalEncryption::~InternalEncryption()
 {
 }
 
-void InternalEncryption::encrypt(const std::string &pwd, int opt)
+void InternalEncryption::encrypt(int opt)
 {
-       bool ret = false;
-       ::ode_internal_encryption_verify_password(pwd.c_str(), &ret);
-       if (!ret) {
-               return;
-       }
-
-       ::ode_internal_encryption_encrypt(pwd.c_str(), opt);
+       ::ode_internal_encryption_prepare_encryption(opt);
 }
 
-void InternalEncryption::decrypt(const std::string &pwd)
+void InternalEncryption::decrypt()
 {
-       ::ode_internal_encryption_decrypt(pwd.c_str());
+       ::ode_internal_encryption_prepare_decryption();
 }
 
 ExternalEncryption::ExternalEncryption()
index da6a7954ab4c6e85ac15fe826a2f2abfddc824a2..5984c8a9d894af5cb5bb62c780244fdc99485fe7 100644 (file)
@@ -30,8 +30,8 @@ public:
        InternalEncryption();
        ~InternalEncryption();
 
-       void encrypt(const std::string &pwd, int opt);
-       void decrypt(const std::string &pwd);
+       void encrypt(int opt);
+       void decrypt();
 };
 
 class ExternalEncryption {