siphash.h 858 B

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