summaryrefslogtreecommitdiffstats
path: root/Keychain.cpp
diff options
context:
space:
mode:
authorMalfurious <m@lfurio.us>2024-10-25 03:34:18 -0400
committerMalfurious <m@lfurio.us>2024-10-25 03:34:18 -0400
commita86c2daf3d9958c838c55950a53b4a1d6d99f3d1 (patch)
tree80660a9a058033f475c49cc71c4f18ae7cca14ac /Keychain.cpp
parent512aa4c77b3dc0d72db713a9215ff65a98a99ec3 (diff)
parent8455d3e9256bff8d4f74b3606347522ea6c381ca (diff)
downloadcompass-a86c2daf3d9958c838c55950a53b4a1d6d99f3d1.tar.gz
compass-a86c2daf3d9958c838c55950a53b4a1d6d99f3d1.zip
Merge branch 'remove-network'
* remove-network: Remove remote-host and port options Remove Socket class
Diffstat (limited to '')
-rw-r--r--Keychain.cpp15
1 files changed, 6 insertions, 9 deletions
diff --git a/Keychain.cpp b/Keychain.cpp
index 8e017eb..8f0880d 100644
--- a/Keychain.cpp
+++ b/Keychain.cpp
@@ -1,8 +1,6 @@
#include "Keychain.h"
-Keychain::Keychain(std::string remoteHost, std::string port, std::string directory) {
- this->remoteHost = remoteHost;
- this->port = port;
+Keychain::Keychain(std::string directory) {
this->directory = directory;
}
@@ -10,15 +8,14 @@ Keychain::~Keychain() {
}
Keychain* Keychain::newKeychain(std::string directory) {
- Keychain* kc = new Keychain("", "", directory);
- return kc;
+ return new Keychain(directory);
}
-Keychain* Keychain::loadKeychain(std::string remoteHost, std::string port, std::string directory) {
- std::string data = Cryptor::loadAndDecrypt(remoteHost, port, directory);
+Keychain* Keychain::loadKeychain(std::string directory) {
+ std::string data = Cryptor::loadAndDecrypt(directory);
std::istringstream datstr(data);
- Keychain* kc = new Keychain(remoteHost, port, directory);
+ Keychain* kc = new Keychain(directory);
int kcSize, servSize;
datstr >> kcSize;
@@ -86,7 +83,7 @@ void Keychain::saveKeychain() {
}
}
- Cryptor::encryptAndSave(remoteHost, port, directory, datstr.str());
+ Cryptor::encryptAndSave(directory, datstr.str());
}
void Keychain::walk() { // Don't call this, it's just for debuging purposes and prints out plaintext passwords!