diff options
author | Simon Warta <[email protected]> | 2015-07-07 23:59:05 +0200 |
---|---|---|
committer | Simon Warta <[email protected]> | 2015-07-09 10:53:15 +0200 |
commit | be64bdecf297a1041824265a5d33cd8dfe381bec (patch) | |
tree | f78d09a6dbd35b146a905daf0d3ee661d0c8acc1 /src/lib/passhash/bcrypt | |
parent | efdb11eadd9d71378621f803dc99d71d1e2ba339 (diff) |
Don't put pointers into vector iterator constructor in make_bcrypt
Diffstat (limited to 'src/lib/passhash/bcrypt')
-rw-r--r-- | src/lib/passhash/bcrypt/bcrypt.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/passhash/bcrypt/bcrypt.cpp b/src/lib/passhash/bcrypt/bcrypt.cpp index 3f6a68352..f7cf390e9 100644 --- a/src/lib/passhash/bcrypt/bcrypt.cpp +++ b/src/lib/passhash/bcrypt/bcrypt.cpp @@ -90,13 +90,13 @@ std::string make_bcrypt(const std::string& pass, const std::vector<byte>& salt, u16bit work_factor) { - const byte magic[24] = { + auto magic = std::vector<byte>{ 0x4F, 0x72, 0x70, 0x68, 0x65, 0x61, 0x6E, 0x42, 0x65, 0x68, 0x6F, 0x6C, 0x64, 0x65, 0x72, 0x53, 0x63, 0x72, 0x79, 0x44, 0x6F, 0x75, 0x62, 0x74 }; - std::vector<byte> ctext(magic, magic + sizeof(magic)); + std::vector<byte> ctext = magic; Blowfish blowfish; |