1 #ifndef _BFLB_SEC_SHA_H 2 #define _BFLB_SEC_SHA_H 14 #define SHA_MODE_SHA256 0 15 #define SHA_MODE_SHA224 1 16 #define SHA_MODE_SHA1 2 17 #define SHA_MODE_SHA512 4 18 #define SHA_MODE_SHA384 5 19 #define SHA_MODE_SHA512T224 6 20 #define SHA_MODE_SHA512T256 7 231 const uint8_t *input,
244 struct bflb_sha256_link_ctx_s *ctx,
245 const uint8_t *input,
258 struct bflb_sha512_link_ctx_s *ctx,
259 const uint8_t *input,
281 struct bflb_sha256_link_ctx_s *ctx,
292 struct bflb_sha512_link_ctx_s *ctx,
void bflb_sha1_start(struct bflb_device_s *dev, struct bflb_sha1_ctx_s *ctx)
__attribute__((aligned(32))) uint8_t sha_buf[64]
void bflb_sha512_link_start(struct bflb_device_s *dev, struct bflb_sha512_link_ctx_s *ctx, int is384)
void bflb_sha1_link_start(struct bflb_device_s *dev, struct bflb_sha1_link_ctx_s *ctx)
void bflb_sha512_start(struct bflb_device_s *dev, struct bflb_sha512_ctx_s *ctx)
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_sha1_update(struct bflb_device_s *dev, struct bflb_sha1_ctx_s *ctx, const uint8_t *input, uint32_t len)
void bflb_sha256_link_finish(struct bflb_device_s *dev, struct bflb_sha256_link_ctx_s *ctx, uint8_t *output)
void bflb_sha256_finish(struct bflb_device_s *dev, struct bflb_sha256_ctx_s *ctx, uint8_t *output)
int bflb_sha512_link_update(struct bflb_device_s *dev, struct bflb_sha512_link_ctx_s *ctx, const uint8_t *input, uint64_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_sha_link_deinit(struct bflb_device_s *dev)
void bflb_sha512_link_finish(struct bflb_device_s *dev, struct bflb_sha512_link_ctx_s *ctx, uint8_t *output)
void bflb_sha_init(struct bflb_device_s *dev, uint8_t mode)
void bflb_group0_release_sha_access(struct bflb_device_s *dev)
void bflb_sha256_start(struct bflb_device_s *dev, struct bflb_sha256_ctx_s *ctx)
void bflb_group0_request_sha_access(struct bflb_device_s *dev)
void bflb_sha1_finish(struct bflb_device_s *dev, struct bflb_sha1_ctx_s *ctx, uint8_t *output)
void bflb_sha1_link_finish(struct bflb_device_s *dev, struct bflb_sha1_link_ctx_s *ctx, uint8_t *output)
int bflb_sha256_update(struct bflb_device_s *dev, struct bflb_sha256_ctx_s *ctx, const uint8_t *input, uint32_t len)
void bflb_sha256_link_start(struct bflb_device_s *dev, struct bflb_sha256_link_ctx_s *ctx, int is224)
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)