Bouffalo SDK  1.0
Bouffalolab Software Development Kit
bflb_sec_sha.h File Reference
#include "bflb_core.h"
Include dependency graph for bflb_sec_sha.h:

Go to the source code of this file.

Data Structures

struct  bflb_sha1_ctx_s
 
struct  bflb_sha256_ctx_s
 
struct  bflb_sha512_ctx_s
 
struct  bflb_sha_link_s
 
struct  bflb_sha1_link_ctx_s
 
struct  bflb_sha256_link_ctx_s
 
struct  bflb_sha512_link_ctx_s
 

Macros

#define SHA_MODE_SHA256   0
 
#define SHA_MODE_SHA224   1
 
#define SHA_MODE_SHA1   2
 
#define SHA_MODE_SHA512   4
 
#define SHA_MODE_SHA384   5
 
#define SHA_MODE_SHA512T224   6
 
#define SHA_MODE_SHA512T256   7
 

Functions

void bflb_sha_init (struct bflb_device_s *dev, uint8_t mode)
 
void bflb_sha1_start (struct bflb_device_s *dev, struct bflb_sha1_ctx_s *ctx)
 
void bflb_sha256_start (struct bflb_device_s *dev, struct bflb_sha256_ctx_s *ctx)
 
void bflb_sha512_start (struct bflb_device_s *dev, struct bflb_sha512_ctx_s *ctx)
 
int bflb_sha1_update (struct bflb_device_s *dev, struct bflb_sha1_ctx_s *ctx, const uint8_t *input, uint32_t len)
 
int bflb_sha256_update (struct bflb_device_s *dev, struct bflb_sha256_ctx_s *ctx, const uint8_t *input, uint32_t len)
 
int bflb_sha512_update (struct bflb_device_s *dev, struct bflb_sha512_ctx_s *ctx, const uint8_t *input, uint64_t len)
 
void bflb_sha1_finish (struct bflb_device_s *dev, struct bflb_sha1_ctx_s *ctx, uint8_t *output)
 
void bflb_sha256_finish (struct bflb_device_s *dev, struct bflb_sha256_ctx_s *ctx, uint8_t *output)
 
void bflb_sha512_finish (struct bflb_device_s *dev, struct bflb_sha512_ctx_s *ctx, uint8_t *output)
 
void bflb_sha_link_init (struct bflb_device_s *dev)
 
void bflb_sha_link_deinit (struct bflb_device_s *dev)
 
void bflb_sha1_link_start (struct bflb_device_s *dev, struct bflb_sha1_link_ctx_s *ctx)
 
void bflb_sha256_link_start (struct bflb_device_s *dev, struct bflb_sha256_link_ctx_s *ctx, int is224)
 
void bflb_sha512_link_start (struct bflb_device_s *dev, struct bflb_sha512_link_ctx_s *ctx, int is384)
 
int bflb_sha1_link_update (struct bflb_device_s *dev, struct bflb_sha1_link_ctx_s *ctx, const uint8_t *input, uint32_t len)
 
int bflb_sha256_link_update (struct bflb_device_s *dev, struct bflb_sha256_link_ctx_s *ctx, const uint8_t *input, uint32_t len)
 
int bflb_sha512_link_update (struct bflb_device_s *dev, struct bflb_sha512_link_ctx_s *ctx, const uint8_t *input, uint64_t len)
 
void bflb_sha1_link_finish (struct bflb_device_s *dev, struct bflb_sha1_link_ctx_s *ctx, uint8_t *output)
 
void bflb_sha256_link_finish (struct bflb_device_s *dev, struct bflb_sha256_link_ctx_s *ctx, uint8_t *output)
 
void bflb_sha512_link_finish (struct bflb_device_s *dev, struct bflb_sha512_link_ctx_s *ctx, uint8_t *output)
 
void bflb_group0_request_sha_access (struct bflb_device_s *dev)
 
void bflb_group0_release_sha_access (struct bflb_device_s *dev)