diff options
author | Miloslav Trmač <mitr@redhat.com> | 2010-07-24 01:31:44 +0200 |
---|---|---|
committer | Miloslav Trmač <mitr@redhat.com> | 2010-07-24 01:32:21 +0200 |
commit | 9ea8ffaa934b50ced391817ce2e11527f5426f22 (patch) | |
tree | 1444f4d02a65c97116774b311a6938b9159ffe07 /ncr.c | |
parent | 9ea47f5b396bb1e767d4a231bc7166efd3dffd3e (diff) | |
download | cryptodev-linux-9ea8ffaa934b50ced391817ce2e11527f5426f22.tar.gz cryptodev-linux-9ea8ffaa934b50ced391817ce2e11527f5426f22.tar.xz cryptodev-linux-9ea8ffaa934b50ced391817ce2e11527f5426f22.zip |
Replace ncr_algoritm_to_key_type by a struct member
Also handle some algorithms missing in the function.
Diffstat (limited to 'ncr.c')
-rw-r--r-- | ncr.c | 28 |
1 files changed, 0 insertions, 28 deletions
@@ -173,31 +173,3 @@ ncr_ioctl(struct ncr_lists* lst, struct file *filp, return -EINVAL; } } - -/* Returns NCR_KEY_TYPE_SECRET if a secret key algorithm or MAC is given, - * and NCR_KEY_TYPE_PUBLIC if a public key algorithm is given. - */ -ncr_key_type_t ncr_algorithm_to_key_type(const struct algo_properties_st *algo) -{ - switch(algo->algo) { - case NCR_ALG_3DES_CBC: - case NCR_ALG_AES_CBC: - case NCR_ALG_CAMELLIA_CBC: - case NCR_ALG_ARCFOUR: - case NCR_ALG_HMAC_SHA1: - case NCR_ALG_HMAC_MD5: - case NCR_ALG_HMAC_SHA2_224: - case NCR_ALG_HMAC_SHA2_256: - case NCR_ALG_HMAC_SHA2_384: - case NCR_ALG_HMAC_SHA2_512: - return NCR_KEY_TYPE_SECRET; - case NCR_ALG_RSA: - case NCR_ALG_DSA: - return NCR_KEY_TYPE_PUBLIC; - default: - return NCR_KEY_TYPE_INVALID; - } - -} - - |