Apps Components Interfaces All Files Source Tree | source: tos.interfaces.MAC.nc |
Interface to compute a message authentication code.
Commands |
Commands - Details |
Parameters: |
context - opaque data structure to hold the module specific state associated with this invocation of the incremental computation. length - the total length of data that is forthcoming |
Returns: | whether the incremental initialization was successful. This can fail if the underlying cipher operation fails. |
Parameters: |
context - opaque data structure to hold the module specific state associated with this invocation of the incremental computation. msg - the message data to add to the incremental computation. msgLen - number of bytes to add for the incremental computation. |
Returns: | whether the incremental mac computation succeeded or not. It can fail if more data is provided than the initial initialization indicated or if the underlying block cipher fails. |
Parameters: |
context - opaque data structure to hold the module specific state associated with this invocation of the incremental computation. MAC - resulting buffer of at least macSize to hold the generated MAC macSize - the number of bytes of MAC to generate. This must be less than or equal to the underlying blockCipher block size. |
Returns: | whether the command succeeded or not. It can fail if the underlying block cipher fails or if not all expected data was received from the initialization function |
Parameters: |
context - opaque data structure to hold the module specific state associated with this invocation of the incremental computation. msg - a buffer of length size on which the MAC will be calculated length - the total length of the msg buffer - of at least macSize where the resulting MAC calculation will be stored. macSzie - the number of bytes of MAC to generate. This must be less than or equal to the underlying blockCipher block size. |
Returns: | whether the command suceeds or not. It can fail if the underlying blockCipher fails. |