diff options
Diffstat (limited to 'src/libcharon/encoding/payloads/encryption_payload.h')
-rw-r--r-- | src/libcharon/encoding/payloads/encryption_payload.h | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/libcharon/encoding/payloads/encryption_payload.h b/src/libcharon/encoding/payloads/encryption_payload.h index e99c42fb7..5c6069339 100644 --- a/src/libcharon/encoding/payloads/encryption_payload.h +++ b/src/libcharon/encoding/payloads/encryption_payload.h @@ -30,11 +30,6 @@ typedef struct encryption_payload_t encryption_payload_t; #include <encoding/payloads/payload.h> /** - * Encrpytion payload length in bytes without IV and following data. - */ -#define ENCRYPTION_PAYLOAD_HEADER_LENGTH 4 - -/** * The encryption payload as described in RFC section 3.14. */ struct encryption_payload_t { @@ -77,14 +72,18 @@ struct encryption_payload_t { * Generate, encrypt and sign contained payloads. * * @param assoc associated data - * @return TRUE if encrypted + * @return + * - SUCCESS if encryption successful + * - FAILED if encryption failed + * - INVALID_STATE if aead not supplied, but needed */ - bool (*encrypt) (encryption_payload_t *this, chunk_t assoc); + status_t (*encrypt) (encryption_payload_t *this, chunk_t assoc); /** * Decrypt, verify and parse contained payloads. * * @param assoc associated data + * @return * - SUCCESS if parsing successful * - PARSE_ERROR if sub-payload parsing failed * - VERIFY_ERROR if sub-payload verification failed @@ -102,8 +101,9 @@ struct encryption_payload_t { /** * Creates an empty encryption_payload_t object. * + * @param type ENCRYPTED or ENCRYPTED_V1 * @return encryption_payload_t object */ -encryption_payload_t *encryption_payload_create(void); +encryption_payload_t *encryption_payload_create(payload_type_t type); #endif /** ENCRYPTION_PAYLOAD_H_ @}*/ |