CryptoAuthLib
Atmel CryptoAuthentication Library
sha2_routines.c File Reference

Software implementation of the SHA256 algorithm. More...

#include <string.h>
#include "sha2_routines.h"

Macros

#define rotate_right(value, places)   ((value >> places) | (value << (32 - places)))
 

Functions

void sw_sha256_init (sw_sha256_ctx *ctx)
 
void sw_sha256_update (sw_sha256_ctx *ctx, const uint8_t *msg, uint32_t msg_size)
 
void sw_sha256_final (sw_sha256_ctx *ctx, uint8_t digest[SHA256_DIGEST_SIZE])
 
void sw_sha256 (const uint8_t *message, unsigned int len, uint8_t digest[SHA256_DIGEST_SIZE])
 

Detailed Description

Software implementation of the SHA256 algorithm.

Copyright (c) 2015 Atmel Corporation. All rights reserved.

Macro Definition Documentation

#define rotate_right (   value,
  places 
)    ((value >> places) | (value << (32 - places)))

Function Documentation

void sw_sha256 ( const uint8_t *  message,
unsigned int  len,
uint8_t  digest[SHA256_DIGEST_SIZE] 
)
void sw_sha256_final ( sw_sha256_ctx ctx,
uint8_t  digest[SHA256_DIGEST_SIZE] 
)
void sw_sha256_init ( sw_sha256_ctx ctx)
void sw_sha256_update ( sw_sha256_ctx ctx,
const uint8_t *  msg,
uint32_t  msg_size 
)