Mercurial > dovecot > core-2.2
view src/lib-otp/otp-parity.h @ 22649:bb7c452e3662
director: Include peak output buffer size in director connection log messages
author | Timo Sirainen <timo.sirainen@dovecot.fi> |
---|---|
date | Sun, 05 Nov 2017 22:27:41 +0200 |
parents | 62cf70991cf2 |
children |
line wrap: on
line source
#ifndef OTP_PARITY_H #define OTP_PARITY_H extern const unsigned char parity_table[256]; static inline unsigned int otp_parity(unsigned char *data) { unsigned int i, parity = 0; for (i = 0; i < OTP_HASH_SIZE; i++) parity += parity_table[*data++]; return parity & 3; } #endif