8#ifndef BOTAN_BLOWFISH_H_
9#define BOTAN_BLOWFISH_H_
11#include <botan/block_cipher.h>
12#include <botan/secmem.h>
21 void encrypt_n(
const uint8_t in[], uint8_t out[],
size_t blocks)
const override;
22 void decrypt_n(
const uint8_t in[], uint8_t out[],
size_t blocks)
const override;
32 bool salt_first =
false);
34 void clear()
override;
36 std::string
name()
const override {
return "Blowfish"; }
38 std::unique_ptr<BlockCipher>
new_object()
const override {
return std::make_unique<Blowfish>(); }
40 bool has_keying_material()
const override;
43 void key_schedule(std::span<const uint8_t> key)
override;
45 void key_expansion(
const uint8_t key[],
size_t key_length,
const uint8_t salt[],
size_t salt_length);
52 size_t salt_off)
const;
std::unique_ptr< BlockCipher > new_object() const override
void encrypt_n(const uint8_t in[], uint8_t out[], size_t blocks) const override
std::string name() const override
void salted_set_key(const uint8_t key[], size_t key_length, const uint8_t salt[], size_t salt_length, size_t workfactor, bool salt_first=false)
void decrypt_n(const uint8_t in[], uint8_t out[], size_t blocks) const override
std::vector< T, secure_allocator< T > > secure_vector