Implemented a key class
This commit is contained in:
22
GCryptLib/src/Key.cpp
Normal file
22
GCryptLib/src/Key.cpp
Normal file
@@ -0,0 +1,22 @@
|
||||
#include "GCrypt/Key.h"
|
||||
#include "GCrypt/GHash.h"
|
||||
#include "GCrypt/Util.h"
|
||||
|
||||
namespace Leonetienne::GCrypt {
|
||||
|
||||
Key Key::FromPassword(const std::string& password) {
|
||||
return GHash::CalculateHashsum(
|
||||
StringToBits(password)
|
||||
);
|
||||
}
|
||||
|
||||
Key::Key() : Block() {
|
||||
}
|
||||
|
||||
Key::Key(const Block& b) : Block(b) {
|
||||
}
|
||||
|
||||
Key::Key(const Key& k) : Block(k) {
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user