4 #include <linux/crypto.h>
7 /* This is the maximum truncated ICV length that we know of. */
8 #define MAX_AH_AUTH_LEN 12
16 struct crypto_hash *tfm;
19 static inline int ah_mac_digest(struct ah_data *ahp, struct sk_buff *skb,
22 struct hash_desc desc;
28 memset(auth_data, 0, ahp->icv_trunc_len);
29 err = crypto_hash_init(&desc);
32 err = skb_icv_walk(skb, &desc, 0, skb->len, crypto_hash_update);
35 err = crypto_hash_final(&desc, ahp->work_icv);
43 static inline struct ip_auth_hdr *ip_auth_hdr(const struct sk_buff *skb)
45 return (struct ip_auth_hdr *)skb_transport_header(skb);