siphash.h 947 B

1234567891011121314151617181920212223242526
  1. #include <contrib/libs/openssl/redef.h>
  2. /*
  3. * Copyright 2017-2018 The OpenSSL Project Authors. All Rights Reserved.
  4. *
  5. * Licensed under the OpenSSL license (the "License"). You may not use
  6. * this file except in compliance with the License. You can obtain a copy
  7. * in the file LICENSE in the source distribution or at
  8. * https://www.openssl.org/source/license.html
  9. */
  10. #include <stddef.h>
  11. #define SIPHASH_BLOCK_SIZE 8
  12. #define SIPHASH_KEY_SIZE 16
  13. #define SIPHASH_MIN_DIGEST_SIZE 8
  14. #define SIPHASH_MAX_DIGEST_SIZE 16
  15. typedef struct siphash_st SIPHASH;
  16. size_t SipHash_ctx_size(void);
  17. size_t SipHash_hash_size(SIPHASH *ctx);
  18. int SipHash_set_hash_size(SIPHASH *ctx, size_t hash_size);
  19. int SipHash_Init(SIPHASH *ctx, const unsigned char *k,
  20. int crounds, int drounds);
  21. void SipHash_Update(SIPHASH *ctx, const unsigned char *in, size_t inlen);
  22. int SipHash_Final(SIPHASH *ctx, unsigned char *out, size_t outlen);