OLD | NEW |
1 /* | 1 /* |
2 * datatypes.h | 2 * datatypes.h |
3 * | 3 * |
4 * data types for bit vectors and finite fields | 4 * data types for bit vectors and finite fields |
5 * | 5 * |
6 * David A. McGrew | 6 * David A. McGrew |
7 * Cisco Systems, Inc. | 7 * Cisco Systems, Inc. |
8 */ | 8 */ |
9 | 9 |
10 /* | 10 /* |
(...skipping 371 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
382 * and b are not equal, returns 0 otherwise | 382 * and b are not equal, returns 0 otherwise |
383 */ | 383 */ |
384 | 384 |
385 int | 385 int |
386 octet_string_is_eq(uint8_t *a, uint8_t *b, int len); | 386 octet_string_is_eq(uint8_t *a, uint8_t *b, int len); |
387 | 387 |
388 void | 388 void |
389 octet_string_set_to_zero(uint8_t *s, int len); | 389 octet_string_set_to_zero(uint8_t *s, int len); |
390 | 390 |
391 | 391 |
392 #if !defined(SRTP_KERNEL_LINUX) //&& defined(HAVE_CONFIG_H) | 392 #if !defined(SRTP_KERNEL_LINUX) && defined(HAVE_CONFIG_H) |
393 | 393 |
394 /* | 394 /* |
395 * Convert big endian integers to CPU byte order. | 395 * Convert big endian integers to CPU byte order. |
396 */ | 396 */ |
397 #ifdef WORDS_BIGENDIAN | 397 #ifdef WORDS_BIGENDIAN |
398 /* Nothing to do. */ | 398 /* Nothing to do. */ |
399 # define be32_to_cpu(x) (x) | 399 # define be32_to_cpu(x) (x) |
400 # define be64_to_cpu(x) (x) | 400 # define be64_to_cpu(x) (x) |
401 #elif defined(HAVE_BYTESWAP_H) | 401 #elif defined(HAVE_BYTESWAP_H) |
402 /* We have (hopefully) optimized versions in byteswap.h */ | 402 /* We have (hopefully) optimized versions in byteswap.h */ |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
513 bitvector_left_shift(bitvector_t *x, int index); | 513 bitvector_left_shift(bitvector_t *x, int index); |
514 | 514 |
515 char * | 515 char * |
516 bitvector_bit_string(bitvector_t *x, char* buf, int len); | 516 bitvector_bit_string(bitvector_t *x, char* buf, int len); |
517 | 517 |
518 #ifdef TESTAPP_SOURCE | 518 #ifdef TESTAPP_SOURCE |
519 int base64_string_to_octet_string(char *raw, int *pad, char *base64, int len); | 519 int base64_string_to_octet_string(char *raw, int *pad, char *base64, int len); |
520 #endif | 520 #endif |
521 | 521 |
522 #endif /* _DATATYPES_H */ | 522 #endif /* _DATATYPES_H */ |
OLD | NEW |