mirror of
https://codeberg.org/scip/pcp.git
synced 2025-12-18 04:10:57 +01:00
added CBC encryption mode (configure --enable-cbc)
This commit is contained in:
@@ -20,7 +20,7 @@
|
||||
*/
|
||||
|
||||
|
||||
// various helpers
|
||||
// various helpers, too small to put into own c
|
||||
|
||||
#ifndef _HAVE_PCP_UTIL_H
|
||||
#define _HAVE_PCP_UTIL_H
|
||||
@@ -58,4 +58,11 @@ static inline size_t _findoffset(unsigned char *bin, size_t binlen, char *sigsta
|
||||
return offset;
|
||||
}
|
||||
|
||||
static inline void _xorbuf(unsigned char *iv, unsigned char *buf, size_t xlen) {
|
||||
size_t i;
|
||||
for (i = 0; i < xlen; ++i)
|
||||
buf[i] = iv[i] ^ buf[i];
|
||||
}
|
||||
|
||||
|
||||
#endif // _HAVE_PCP_UTIL_H
|
||||
|
||||
Reference in New Issue
Block a user