ports/net-im/ring-daemon/files/patch-src_archiver.cpp
Kurt Jaeger 98c787c4cd New port: net-im/ring-daemon
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>
2016-05-29 03:50:56 +00:00

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;