MCPcopy Create free account
hub / github.com/F-Stack/f-stack / padlock_hash_key_setup

Function padlock_hash_key_setup

freebsd/crypto/via/padlock_hash.c:258–276  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

256}
257
258static void
259padlock_hash_key_setup(struct padlock_session *ses, const uint8_t *key,
260 int klen)
261{
262 struct auth_hash *axf;
263
264 axf = ses->ses_axf;
265
266 /*
267 * Try to free contexts before using them, because
268 * padlock_hash_key_setup() can be called twice - once from
269 * padlock_newsession() and again from padlock_process().
270 */
271 padlock_free_ctx(axf, ses->ses_ictx);
272 padlock_free_ctx(axf, ses->ses_octx);
273
274 hmac_init_ipad(axf, key, klen, ses->ses_ictx);
275 hmac_init_opad(axf, key, klen, ses->ses_octx);
276}
277
278/*
279 * Compute keyed-hash authenticator.

Callers 2

padlock_hash_setupFunction · 0.85
padlock_hash_processFunction · 0.85

Calls 3

padlock_free_ctxFunction · 0.85
hmac_init_ipadFunction · 0.85
hmac_init_opadFunction · 0.85

Tested by

no test coverage detected