summaryrefslogtreecommitdiff
path: root/src/charon/encoding/payloads/encryption_payload.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/charon/encoding/payloads/encryption_payload.h')
-rw-r--r--src/charon/encoding/payloads/encryption_payload.h44
1 files changed, 22 insertions, 22 deletions
diff --git a/src/charon/encoding/payloads/encryption_payload.h b/src/charon/encoding/payloads/encryption_payload.h
index 3b94587ec..ac5326b87 100644
--- a/src/charon/encoding/payloads/encryption_payload.h
+++ b/src/charon/encoding/payloads/encryption_payload.h
@@ -39,7 +39,7 @@ typedef struct encryption_payload_t encryption_payload_t;
/**
* The encryption payload as described in RFC section 3.14.
*
- * Before any crypt/decrypt/sign/verify operation can occur,
+ * Before any crypt/decrypt/sign/verify operation can occur,
* the transforms must be set. After that, a parsed encryption payload
* can be decrypted, which also will parse the contained payloads.
* Encryption is done the same way, added payloads will get generated
@@ -54,24 +54,24 @@ struct encryption_payload_t {
* Implements payload_t interface.
*/
payload_t payload_interface;
-
+
/**
* Creates an iterator for all contained payloads.
- *
+ *
* iterator_t object has to get destroyed by the caller.
*
* @param forward iterator direction (TRUE: front to end)
* return created iterator_t object
*/
iterator_t *(*create_payload_iterator) (encryption_payload_t *this, bool forward);
-
+
/**
* Adds a payload to this encryption payload.
*
* @param payload payload_t object to add
*/
void (*add_payload) (encryption_payload_t *this, payload_t *payload);
-
+
/**
* Reove the last payload in the contained payload list.
*
@@ -81,20 +81,20 @@ struct encryption_payload_t {
* - NOT_FOUND if list empty
*/
status_t (*remove_first_payload) (encryption_payload_t *this, payload_t **payload);
-
+
/**
* Get the number of payloads.
*
* @return number of contained payloads
*/
size_t (*get_payload_count) (encryption_payload_t *this);
-
+
/**
* Set transforms to use.
- *
+ *
* To decryption, encryption, signature building and verifying,
* the payload needs a crypter and a signer object.
- *
+ *
* @warning Do NOT call this function again after encryption, since
* the signer must be the same while encrypting and signature building!
*
@@ -102,10 +102,10 @@ struct encryption_payload_t {
* @param signer signer_t to use for data signing/verifying
*/
void (*set_transforms) (encryption_payload_t *this, crypter_t *crypter, signer_t *signer);
-
+
/**
* Generate and encrypt contained payloads.
- *
+ *
* This function generates the content for added payloads
* and encrypts them. Signature is not built, since we need
* additional data (the full message).
@@ -113,11 +113,11 @@ struct encryption_payload_t {
* @return SUCCESS, or INVALID_STATE if transforms not set
*/
status_t (*encrypt) (encryption_payload_t *this);
-
+
/**
* Decrypt and parse contained payloads.
- *
- * This function decrypts the contained data. After,
+ *
+ * This function decrypts the contained data. After,
* the payloads are parsed internally and are accessible
* via the iterator.
*
@@ -127,29 +127,29 @@ struct encryption_payload_t {
* - FAILED if data is invalid
*/
status_t (*decrypt) (encryption_payload_t *this);
-
+
/**
* Build the signature.
- *
+ *
* The signature is built over the FULL message, so the header
* and every payload (inclusive this one) must already be generated.
* The generated message is supplied via the data paramater.
- *
+ *
* @param data chunk contains the already generated message
* @return
* - SUCCESS, or
* - INVALID_STATE if transforms not set
*/
status_t (*build_signature) (encryption_payload_t *this, chunk_t data);
-
+
/**
* Verify the signature.
- *
+ *
* Since the signature is built over the full message, we need
* this data to do the verification. The message data
* is supplied via the data argument.
- *
- * @param data chunk contains the message
+ *
+ * @param data chunk contains the message
* @return
* - SUCCESS, or
* - FAILED if signature invalid, or
@@ -165,7 +165,7 @@ struct encryption_payload_t {
/**
* Creates an empty encryption_payload_t object.
- *
+ *
* @return encryption_payload_t object
*/
encryption_payload_t *encryption_payload_create(void);