… | |
… | |
94 | |
94 | |
95 | struct hmac_packet : net_packet |
95 | struct hmac_packet : net_packet |
96 | { |
96 | { |
97 | u8 hmac[HMACLENGTH]; // each and every packet has a hmac field, but that is not (yet) checked everywhere |
97 | u8 hmac[HMACLENGTH]; // each and every packet has a hmac field, but that is not (yet) checked everywhere |
98 | |
98 | |
99 | void hmac_set (crypto_ctx * ctx); |
99 | void hmac_set (crypto_ctx *ctx); |
100 | bool hmac_chk (crypto_ctx * ctx); |
100 | bool hmac_chk (crypto_ctx *ctx); |
101 | |
101 | |
102 | private: |
102 | private: |
103 | void hmac_gen (crypto_ctx * ctx, u8 *hmac_digest); |
103 | void hmac_gen (crypto_ctx *ctx, u8 *hmac_digest); |
104 | }; |
104 | }; |
105 | |
105 | |
106 | struct vpn_packet : hmac_packet |
106 | struct vpn_packet : hmac_packet |
107 | { |
107 | { |
108 | enum ptype |
108 | enum ptype |