Functions |
|
| int32_t | SaSi_PalMemCmp (const void *aTarget, const void *aSource, uint32_t aSize) |
|
This function purpose is to compare between two given buffers according to given size.
More...
|
|
| SaSiStatus | SaSi_PalSecMemCmp (const uint8_t *aTarget, const uint8_t *aSource, uint32_t aSize) |
|
This function purpose is to perform secured memory comparison between two given buffers according to given size. The function will compare each byte till aSize number of bytes was compared even if the bytes are different. The function should be used to avoid security timing attacks.
More...
|
|
| void | SaSi_PalMemCopy (void *aDestination, const void *aSource, uint32_t aSize) |
|
This function purpose is to copy aSize bytes from source buffer to destination buffer.
More...
|
|
| void | SaSi_PalMemMove (void *aDestination, const void *aSource, uint32_t aSize) |
|
This function purpose is to copy aSize bytes from source buffer to destination buffer. This function Supports overlapped buffers.
More...
|
|
| void | SaSi_PalMemSet (void *aTarget, const uint8_t aChar, uint32_t aSize) |
|
This function purpose is to set aSize bytes in the given buffer with aChar.
More...
|
|
| void | SaSi_PalMemSetZero (void *aTarget, uint32_t aSize) |
|
This function purpose is to set aSize bytes in the given buffer with zeroes.
More...
|
|
| void * | SaSi_PalMemMalloc (uint32_t aSize) |
|
This function purpose is to allocate a memory buffer according to aSize.
More...
|
|
| void * | SaSi_PalMemRealloc (void *aBuffer, uint32_t aNewSize) |
|
This function purpose is to reallocate a memory buffer according to aNewSize. The content of the old buffer is moved to the new location.
More...
|
|
| void | SaSi_PalMemFree (void *aBuffer) |
|
This function purpose is to free allocated buffer.
More...
|
|
Detailed Description
Function Documentation
| int32_t SaSi_PalMemCmp | ( | const void * | aTarget , |
| const void * | aSource , | ||
| uint32_t | aSize | ||
| ) |
This function purpose is to compare between two given buffers according to given size.
- Returns
- The return values is according to operating system return values.
- Parameters
-
[in] aTarget The target buffer to compare. [in] aSource The Source buffer to compare to. [in] aSize Number of bytes to compare.
| void SaSi_PalMemCopy | ( | void * | aDestination , |
| const void * | aSource , | ||
| uint32_t | aSize | ||
| ) |
This function purpose is to copy aSize bytes from source buffer to destination buffer.
- Returns
- void.
- Parameters
-
[out] aDestination The destination buffer to copy bytes to. [in] aSource The Source buffer to copy from. [in] aSize Number of bytes to copy.
| void SaSi_PalMemFree | ( | void * | aBuffer | ) |
This function purpose is to free allocated buffer.
- Returns
- void.
- Parameters
-
[in] aBuffer Pointer to allocated buffer.
| void* SaSi_PalMemMalloc | ( | uint32_t | aSize | ) |
This function purpose is to allocate a memory buffer according to aSize.
- Returns
- The function will return a pointer to allocated buffer or NULL if allocation failed.
- Parameters
-
[in] aSize Number of bytes to allocate.
| void SaSi_PalMemMove | ( | void * | aDestination , |
| const void * | aSource , | ||
| uint32_t | aSize | ||
| ) |
This function purpose is to copy aSize bytes from source buffer to destination buffer. This function Supports overlapped buffers.
- Returns
- void.
- Parameters
-
[out] aDestination The destination buffer to copy bytes to. [in] aSource The Source buffer to copy from. [in] aSize Number of bytes to copy.
| void* SaSi_PalMemRealloc | ( | void * | aBuffer , |
| uint32_t | aNewSize | ||
| ) |
This function purpose is to reallocate a memory buffer according to aNewSize. The content of the old buffer is moved to the new location.
- Returns
- The function will return a pointer to the newly allocated buffer or NULL if allocation failed.
- Parameters
-
[in] aBuffer Pointer to allocated buffer. [in] aNewSize Number of bytes to reallocate.
| void SaSi_PalMemSet | ( | void * | aTarget , |
| const uint8_t | aChar , | ||
| uint32_t | aSize | ||
| ) |
This function purpose is to set aSize bytes in the given buffer with aChar.
- Returns
- void.
- Parameters
-
[out] aTarget The target buffer to set. [in] aChar The char to set into aTarget. [in] aSize Number of bytes to set.
| void SaSi_PalMemSetZero | ( | void * | aTarget , |
| uint32_t | aSize | ||
| ) |
This function purpose is to set aSize bytes in the given buffer with zeroes.
- Returns
- void.
- Parameters
-
[out] aTarget The target buffer to set. [in] aSize Number of bytes to set.
| SaSiStatus SaSi_PalSecMemCmp | ( | const uint8_t * | aTarget , |
| const uint8_t * | aSource , | ||
| uint32_t | aSize | ||
| ) |
This function purpose is to perform secured memory comparison between two given buffers according to given size. The function will compare each byte till aSize number of bytes was compared even if the bytes are different. The function should be used to avoid security timing attacks.
- Returns
- SASI_SUCCESS in case of success,
- value on failure as defined in ssi_pal_error.h.
- Parameters
-
[in] aTarget The target buffer to compare. [in] aSource The Source buffer to compare to. [in] aSize Number of bytes to compare.