Changeset 112104 in webkit


Ignore:
Timestamp:
Mar 26, 2012 8:37:11 AM (12 years ago)
Author:
commit-queue@webkit.org
Message:

[BlackBerry] CredentialBackingStore implement encryptString() and decryptString()
https://bugs.webkit.org/show_bug.cgi?id=82204

Patch by Jonathan Dong <Jonathan Dong> on 2012-03-26
Reviewed by Rob Buis.

Implemented encryptedString() and decryptedString() in class CredentialBackingStore
by calling BlackBerry::Platform::Encryptor::encryptString() and
BlackBerry::Platform::Encryptor::encryptString() respectively.

No new tests.

  • platform/network/blackberry/CredentialBackingStore.cpp:

(WebCore::CredentialBackingStore::encryptedString):
(WebCore::CredentialBackingStore::decryptedString):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r112102 r112104  
     12012-03-26  Jonathan Dong  <jonathan.dong@torchmobile.com.cn>
     2
     3        [BlackBerry] CredentialBackingStore implement encryptString() and decryptString()
     4        https://bugs.webkit.org/show_bug.cgi?id=82204
     5
     6        Reviewed by Rob Buis.
     7
     8        Implemented encryptedString() and decryptedString() in class CredentialBackingStore
     9        by calling BlackBerry::Platform::Encryptor::encryptString() and
     10        BlackBerry::Platform::Encryptor::encryptString() respectively.
     11
     12        No new tests.
     13
     14        * platform/network/blackberry/CredentialBackingStore.cpp:
     15        (WebCore::CredentialBackingStore::encryptedString):
     16        (WebCore::CredentialBackingStore::decryptedString):
     17
    1182012-03-26  Pavel Feldman  <pfeldman@chromium.org>
    219
  • trunk/Source/WebCore/platform/network/blackberry/CredentialBackingStore.cpp

    r111811 r112104  
    2929#include "SQLiteStatement.h"
    3030#include <BlackBerryPlatformClient.h>
     31#include <BlackBerryPlatformEncryptor.h>
    3132
    3233#define HANDLE_SQL_EXEC_FAILURE(statement, returnValue, ...) \
     
    424425String CredentialBackingStore::encryptedString(const String& plainText) const
    425426{
    426     // FIXME: Need encrypt plainText here
    427     notImplemented();
    428     return plainText;
     427    std::string cipherText;
     428    BlackBerry::Platform::Encryptor::encryptString(std::string(plainText.latin1().data()), &cipherText);
     429    return String(cipherText.c_str());
    429430}
    430431
    431432String CredentialBackingStore::decryptedString(const String& cipherText) const
    432433{
    433     // FIXME: Need decrypt cipherText here
    434     notImplemented();
    435     return cipherText;
     434    std::string plainText;
     435    BlackBerry::Platform::Encryptor::decryptString(std::string(cipherText.latin1().data()), &plainText);
     436    return String(plainText.c_str());
    436437}
    437438
Note: See TracChangeset for help on using the changeset viewer.