keygen/src/iam.c
/**
 * countZeroBytes() - Counts the number of sequential zero bytes at the end of a buffer
 * @buf: The buffer to count
 * @size: The number of bytes in the buffer
 *
 * Returns the number of 0x00 bytes at the end (least signifiant) portion of a network order byte sequence.
 * This function does not count bits in a partially zero byte.
 *
 * Return: The number of zero bytes found
 */
Counts the number of sequential zero bytes at the end of a buffer
@buf: The buffer to count
@size: The number of bytes in the buffer

Returns the number of 0x00 bytes at the end (least signifiant) portion of a network order byte sequence.
This function does not count bits in a partially zero byte.

The number of zero bytes found
Counts the number of sequential zero bytes at the end of a buffer @buf : The buffer to count @size : The number of bytes in the buffer Returns the number of 0x00 bytes at the end ( least signifiant ) portion of a network order byte sequence . This function does not count bits in a partially zero byte . The number of zero bytes found
static int countZeroBytes(const char *buf, int size)
{
    int ret = 0;
    for (; size>0 && !buf[size-1]; size--)
        ret++;
    return ret;
}
static int countZeroBytes ( const char * buf , int size ) { int ret = 0 ; for ( ; size > 0 && ! buf [ size - 1 ] ; size -- ) ret ++ ; return ret ; }
countZeroBytes() - Counts the number of sequential zero bytes at the end of a buffer
 @buf: The buffer to count
 @size: The number of bytes in the buffer
countZeroBytes () - Counts the number of sequential zero bytes at the end of a buffer @buf : The buffer to count @size : The number of bytes in the buffer
/* Count the number of sequential sero bytes at the end */