diff options
Diffstat (limited to 'src/manager/service/key-provider.cpp')
-rw-r--r-- | src/manager/service/key-provider.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/manager/service/key-provider.cpp b/src/manager/service/key-provider.cpp index 18911537..e89af167 100644 --- a/src/manager/service/key-provider.cpp +++ b/src/manager/service/key-provider.cpp @@ -146,12 +146,12 @@ KeyData makePKEK1(const KeyComponentsInfo& keyInfo, const Password &password) return key; } -// derives a key used for DB DEK encryption (aka PKEK2) from DomainKEK and user id -KeyData makePKEK2(const uint8_t *domainKEK, const std::string &user) +// derives a key (PKEK2) from DomainKEK and custom client string (may be a client id or uid) +KeyData makePKEK2(const uint8_t *domainKEK, const std::string &client) { KeyData key; - if (!PKCS5_PBKDF2_HMAC_SHA1(user.c_str(), - user.size(), + if (!PKCS5_PBKDF2_HMAC_SHA1(client.c_str(), + client.size(), domainKEK, MAX_SALT_SIZE, PBKDF2_ITERATIONS, @@ -413,7 +413,7 @@ RawBuffer KeyProvider::getPureDEK(const RawBuffer &DEKInWrapForm) (kmcDEK.getKeyAndInfo().key) + kmcDEK.getKeyAndInfo().keyInfo.keyLength); } -RawBuffer KeyProvider::generateDEK(const ClientId &client) +RawBuffer KeyProvider::generateDEK(const std::string &client) { if (!m_isInitialized) ThrowErr(Exc::InternalError, "Object not initialized!"); |