1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
//! IPsec security protocol wire builders (RFC 4302 Authentication Header & RFC 4303 ESP).
//!
//! Re-exports the RFC 4302 IPsec Authentication Header wire builder ([`build_ipsec_ah_payload`], IP
//! protocol `51`) and the RFC 4303 IPsec Encapsulating Security Payload wire builder
//! ([`build_ipsec_esp_payload`], IP protocol `50`). Both builders serialize Security Parameters
//! Index (`SPI`), anti-replay Sequence Number (`SEQ`), Initialization Vector (`IV`), `Next Header`
//! (`NEXT_HEADER`), and Integrity Check Value (`ICV`) fields for transport-mode and tunnel-mode SAs.
//!
//! Canonical `.fasm` syntax:
//! `a -> b [IPSEC | ESP | AH] [SPI <u32>] [SEQ <u32>] [IV "<hex>"] [ICV "<hex>"] [NEXT_HEADER <u8>]`
use crateIpsecSpec;
use Vec;
pub use build_ipsec_ah_payload;
/// Builds an RFC 4303 IPsec Encapsulating Security Payload (`ESP`) body and returns `(bytes, 50)`.