2 * Copyright (C) 2006-2009 Martin Willi
3 * Hochschule fuer Technik Rapperswil
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License as published by the
7 * Free Software Foundation; either version 2 of the License, or (at your
8 * option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>.
10 * This program is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
12 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
16 #include <crypto/transform.h>
17 #include <crypto/hashers/hasher.h>
18 #include <crypto/rngs/rng.h>
20 ENUM_BEGIN(transform_type_names
, ENCRYPTION_ALGORITHM
, EXTENDED_SEQUENCE_NUMBERS
,
21 "ENCRYPTION_ALGORITHM",
22 "PSEUDO_RANDOM_FUNCTION",
23 "INTEGRITY_ALGORITHM",
24 "DIFFIE_HELLMAN_GROUP",
25 "EXTENDED_SEQUENCE_NUMBERS");
26 ENUM_NEXT(transform_type_names
, HASH_ALGORITHM
, EXTENDED_OUTPUT_FUNCTION
,
27 EXTENDED_SEQUENCE_NUMBERS
,
29 "RANDOM_NUMBER_GENERATOR",
31 "COMPRESSION_ALGORITHM",
32 "EXTENDED OUTPUT FUNCTION");
33 ENUM_END(transform_type_names
, EXTENDED_OUTPUT_FUNCTION
);
36 ENUM(extended_sequence_numbers_names
, NO_EXT_SEQ_NUMBERS
, EXT_SEQ_NUMBERS
,
45 enum_name_t
* transform_get_enum_names(transform_type_t type
)
50 return hash_algorithm_names
;
51 case RANDOM_NUMBER_GENERATOR
:
52 return rng_quality_names
;
54 case ENCRYPTION_ALGORITHM
:
55 return encryption_algorithm_names
;
56 case PSEUDO_RANDOM_FUNCTION
:
57 return pseudo_random_function_names
;
58 case INTEGRITY_ALGORITHM
:
59 return integrity_algorithm_names
;
60 case DIFFIE_HELLMAN_GROUP
:
61 return diffie_hellman_group_names
;
62 case EXTENDED_SEQUENCE_NUMBERS
:
63 return extended_sequence_numbers_names
;
64 case EXTENDED_OUTPUT_FUNCTION
:
65 return ext_out_function_names
;
66 case COMPRESSION_ALGORITHM
: