feisty meow concerns codebase 2.140
borked_blowfish_crypto.h
Go to the documentation of this file.
1#ifndef BLOWFISH_CRYPTO_CLASS
2#define BLOWFISH_CRYPTO_CLASS
3
4/*
5* Name : borked_blowfish_crypto
6* Author : Chris Koeritz
7* Purpose: provides BlowFish encryption on byte_arrays using the OpenSSL package.
8****
9* Copyright (c) 2005-$now By Author. This program is free software; you can
10* redistribute it and/or modify it under the terms of the GNU General Public
11* License as published by the Free Software Foundation; either version 2 of
12* the License or (at your option) any later version. This is online at:
13* http://www.fsf.org/copyleft/gpl.html
14* Please send any updates to: fred@gruntose.com
15*/
16
17/*
18 * NOTE:
19 * this class is currently failing with bad decrypt, which we actually blame the openssl
20 * libraries for. we have the same exact underlying usage of cryptical_envelopment class
21 * to drive the EVP functions for our twofish implementation, and it never has that issue.
22 * our blowfish implementation *used* to work fine, until openssl 3 or so.
23 */
24
25#include <basis/byte_array.h>
26#include <basis/contracts.h>
27
29
30namespace crypto {
31
33{
34public:
37
48
50
52
54
55 DEFINE_CLASS_NAME("borked_blowfish_crypto");
56
57 // blowfish relevant values for appropriate key sizes.
60 static int static_minimum_key_size_in_bits() { return 64; }
61 // officially, this is 32. but openssl fails occasionally with less than 64 bits.
62 static int static_maximum_key_size_in_bits() { return 448; }
63};
64
65} //namespace.
66
67#endif
68
A very common template for a dynamic array of bytes.
Definition byte_array.h:36
borked_blowfish_crypto & operator=(const borked_blowfish_crypto &to_copy)
virtual int minimum_key_size_in_bits() const
returns the minimum key size in bits supported here.
virtual int maximum_key_size_in_bits() const
returns the maximum key size in bits supported here.
DEFINE_CLASS_NAME("borked_blowfish_crypto")