mirror of
https://git.freebsd.org/ports.git
synced 2025-05-25 07:26:29 -04:00
Ring is a secure and distributed voice, video and chat communication platform that requires no centralized server and leaves the power of privacy in the hands of the user. WWW: https://ring.cx/ PR: 209542 Submitted by: Yuri Victorovich <yuri@rawbw.com>
22 lines
792 B
C++
22 lines
792 B
C++
--- src/archiver.cpp.orig 2016-05-10 20:45:50 UTC
|
|
+++ src/archiver.cpp
|
|
@@ -97,7 +97,8 @@ Archiver::exportAccounts(std::vector<std
|
|
}
|
|
|
|
// Encrypt using provided password
|
|
- auto encrypted = dht::crypto::aesEncrypt(compressed, password);
|
|
+ dht::Blob blob; for (auto c : password) blob.push_back(c);
|
|
+ auto encrypted = dht::crypto::aesEncrypt(compressed, blob);
|
|
|
|
// Write
|
|
try {
|
|
@@ -151,7 +152,8 @@ Archiver::importAccounts(std::string arc
|
|
|
|
// Decrypt
|
|
try {
|
|
- file = dht::crypto::aesDecrypt(file, password);
|
|
+ dht::Blob blob; for (auto c : password) blob.push_back(c);
|
|
+ file = dht::crypto::aesDecrypt(file, blob);
|
|
} catch (const std::exception& ex) {
|
|
RING_ERR("Decryption failed: %s", ex.what());
|
|
return EPERM;
|