X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=lib%2Finternal-encryption.cpp;h=c1bf9e35a0f9f4193045ffce11395f6d45b3db65;hb=6ea29cd16e93d02cde0cb01a3bee49e0c0107802;hp=6a15e0061d524e1374626a95cadcabc0827f0e29;hpb=223219ea3b16bbe0b6c8d1321122148fe0294b9a;p=platform%2Fcore%2Fsecurity%2Fode.git diff --git a/lib/internal-encryption.cpp b/lib/internal-encryption.cpp index 6a15e00..c1bf9e3 100644 --- a/lib/internal-encryption.cpp +++ b/lib/internal-encryption.cpp @@ -44,10 +44,10 @@ int InternalEncryption::umount() } } -int InternalEncryption::encrypt(const std::string& password) +int InternalEncryption::encrypt(const std::string& password, unsigned int options) { try { - return context->methodCall("InternalEncryption::encrypt", password); + return context->methodCall("InternalEncryption::encrypt", password, options); } catch (runtime::Exception& e) { return -1; } @@ -62,6 +62,44 @@ int InternalEncryption::decrypt(const std::string& password) } } +int InternalEncryption::recovery() +{ + try { + return context->methodCall("InternalEncryption::recovery"); + } catch (runtime::Exception& e) { + return -1; + } +} + +int InternalEncryption::isPasswordInitialized() +{ + try { + return context->methodCall("InternalEncryption::isPasswordInitialized"); + } catch (runtime::Exception& e) { + return -1; + } +} + +int InternalEncryption::initPassword(const std::string& password) +{ + try { + return context->methodCall("InternalEncryption::initPassword", + password); + } catch (runtime::Exception& e) { + return -1; + } +} + +int InternalEncryption::cleanPassword(const std::string& password) +{ + try { + return context->methodCall("InternalEncryption::cleanPassword", + password); + } catch (runtime::Exception& e) { + return -1; + } +} + int InternalEncryption::changePassword(const std::string& oldPassword, const std::string& newPassword) { @@ -73,6 +111,16 @@ int InternalEncryption::changePassword(const std::string& oldPassword, } } +int InternalEncryption::verifyPassword(const std::string& password) +{ + try { + return context->methodCall("InternalEncryption::verifyPassword", + password); + } catch (runtime::Exception& e) { + return -1; + } +} + int InternalEncryption::getState() { try { @@ -82,4 +130,13 @@ int InternalEncryption::getState() } } +unsigned int InternalEncryption::getSupportedOptions() +{ + try { + return context->methodCall("InternalEncryption::getSupportedOptions"); + } catch (runtime::Exception& e) { + return -1; + } +} + } // namespace ode