diff options
Diffstat (limited to 'src/lib/block/blowfish/blowfish.h')
-rw-r--r-- | src/lib/block/blowfish/blowfish.h | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/src/lib/block/blowfish/blowfish.h b/src/lib/block/blowfish/blowfish.h index fa84e2a3d..d5c318752 100644 --- a/src/lib/block/blowfish/blowfish.h +++ b/src/lib/block/blowfish/blowfish.h @@ -24,8 +24,16 @@ class BOTAN_PUBLIC_API(2,0) Blowfish final : public Block_Cipher_Fixed_Params<8, /** * Modified EKSBlowfish key schedule, used for bcrypt password hashing */ + void salted_set_key(const uint8_t key[], size_t key_length, + const uint8_t salt[], size_t salt_length, + size_t workfactor); + + BOTAN_DEPRECATED("Use Blowfish::salted_set_key taking salt length") void eks_key_schedule(const uint8_t key[], size_t key_length, - const uint8_t salt[16], size_t workfactor); + const uint8_t salt[16], size_t workfactor) + { + salted_set_key(key, key_length, salt, 16, workfactor); + } void clear() override; std::string name() const override { return "Blowfish"; } @@ -35,11 +43,13 @@ class BOTAN_PUBLIC_API(2,0) Blowfish final : public Block_Cipher_Fixed_Params<8, void key_expansion(const uint8_t key[], size_t key_length, - const uint8_t salt[16]); + const uint8_t salt[], + size_t salt_length); void generate_sbox(secure_vector<uint32_t>& box, uint32_t& L, uint32_t& R, - const uint8_t salt[16], + const uint8_t salt[], + size_t salt_length, size_t salt_off) const; secure_vector<uint32_t> m_S, m_P; |