[go: up one dir, main page]

File: psha2_capi.h

package info (click to toggle)
sleef 3.9.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 8,564 kB
  • sloc: ansic: 49,154; cpp: 6,095; makefile: 38
file content (30 lines) | stat: -rw-r--r-- 709 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#include <stddef.h>

#ifdef __cplusplus
extern "C" {
#endif

  static const size_t SHA256_DIGEST_LENGTH = 32;

  typedef int EVP_MD;
  typedef void ENGINE;

  typedef struct {
    int type;
    union {
      struct PSHA2_256_Internal *psha_256;
    };
  } EVP_MD_CTX;

  const EVP_MD *EVP_sha256(void);
  int EVP_MD_get_size(const EVP_MD *);
  size_t EVP_MD_size(const EVP_MD *);
  EVP_MD_CTX *EVP_MD_CTX_new(void);
  int EVP_DigestInit_ex(EVP_MD_CTX *ctx, const EVP_MD *type, ENGINE *impl);
  int EVP_DigestUpdate(EVP_MD_CTX *ctx, const void *d, size_t cnt);
  int EVP_DigestFinal_ex(EVP_MD_CTX *ctx, unsigned char *md, unsigned int *s);
  void EVP_MD_CTX_free(EVP_MD_CTX *ctx);

#ifdef __cplusplus
}
#endif