aboutsummaryrefslogtreecommitdiffstats
path: root/src/libstate/lookup.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstate/lookup.cpp')
-rw-r--r--src/libstate/lookup.cpp76
1 files changed, 0 insertions, 76 deletions
diff --git a/src/libstate/lookup.cpp b/src/libstate/lookup.cpp
index d971618c2..f5d2c5a0c 100644
--- a/src/libstate/lookup.cpp
+++ b/src/libstate/lookup.cpp
@@ -62,82 +62,6 @@ u32bit output_length_of(const std::string& name)
}
/*
-* Check if a keylength is valid for this algo
-*/
-bool valid_keylength_for(u32bit key_len, const std::string& name)
- {
- Algorithm_Factory& af = global_state().algorithm_factory();
-
- if(const BlockCipher* bc = af.prototype_block_cipher(name))
- return bc->valid_keylength(key_len);
-
- if(const StreamCipher* sc = af.prototype_stream_cipher(name))
- return sc->valid_keylength(key_len);
-
- if(const MessageAuthenticationCode* mac = af.prototype_mac(name))
- return mac->valid_keylength(key_len);
-
- throw Algorithm_Not_Found(name);
- }
-
-/*
-* Query the MINIMUM_KEYLENGTH of an algorithm
-*/
-u32bit min_keylength_of(const std::string& name)
- {
- Algorithm_Factory& af = global_state().algorithm_factory();
-
- if(const BlockCipher* bc = af.prototype_block_cipher(name))
- return bc->MINIMUM_KEYLENGTH;
-
- if(const StreamCipher* sc = af.prototype_stream_cipher(name))
- return sc->MINIMUM_KEYLENGTH;
-
- if(const MessageAuthenticationCode* mac = af.prototype_mac(name))
- return mac->MINIMUM_KEYLENGTH;
-
- throw Algorithm_Not_Found(name);
- }
-
-/*
-* Query the MAXIMUM_KEYLENGTH of an algorithm
-*/
-u32bit max_keylength_of(const std::string& name)
- {
- Algorithm_Factory& af = global_state().algorithm_factory();
-
- if(const BlockCipher* bc = af.prototype_block_cipher(name))
- return bc->MAXIMUM_KEYLENGTH;
-
- if(const StreamCipher* sc = af.prototype_stream_cipher(name))
- return sc->MAXIMUM_KEYLENGTH;
-
- if(const MessageAuthenticationCode* mac = af.prototype_mac(name))
- return mac->MAXIMUM_KEYLENGTH;
-
- throw Algorithm_Not_Found(name);
- }
-
-/*
-* Query the KEYLENGTH_MULTIPLE of an algorithm
-*/
-u32bit keylength_multiple_of(const std::string& name)
- {
- Algorithm_Factory& af = global_state().algorithm_factory();
-
- if(const BlockCipher* bc = af.prototype_block_cipher(name))
- return bc->KEYLENGTH_MULTIPLE;
-
- if(const StreamCipher* sc = af.prototype_stream_cipher(name))
- return sc->KEYLENGTH_MULTIPLE;
-
- if(const MessageAuthenticationCode* mac = af.prototype_mac(name))
- return mac->KEYLENGTH_MULTIPLE;
-
- throw Algorithm_Not_Found(name);
- }
-
-/*
* Get a cipher object
*/
Keyed_Filter* get_cipher(const std::string& algo_spec,