| 161 | } |
| 162 | |
| 163 | static void |
| 164 | cryptocteon_calc_hash(const struct crypto_session_params *csp, const char *key, |
| 165 | struct octo_sess *ocd) |
| 166 | { |
| 167 | char hash_key[SHA1_HASH_LEN]; |
| 168 | |
| 169 | memset(hash_key, 0, sizeof(hash_key)); |
| 170 | memcpy(hash_key, key, csp->csp_auth_klen); |
| 171 | octo_calc_hash(csp->csp_auth_alg == CRYPTO_SHA1_HMAC, hash_key, |
| 172 | ocd->octo_hminner, ocd->octo_hmouter); |
| 173 | } |
| 174 | |
| 175 | /* Generate a new octo session. */ |
| 176 | static int |
no test coverage detected