Arduino Mavlink
Loading...
Searching...
No Matches
Classes | Macros | Functions
mavlink_sha256.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  mavlink_sha256_ctx
 

Macros

#define MAVLINK_HELPER
 
#define Ch(x, y, z)   (((x) & (y)) ^ ((~(x)) & (z)))
 
#define Maj(x, y, z)   (((x) & (y)) ^ ((x) & (z)) ^ ((y) & (z)))
 
#define ROTR(x, n)   (((x)>>(n)) | ((x) << (32 - (n))))
 
#define Sigma0(x)   (ROTR(x,2) ^ ROTR(x,13) ^ ROTR(x,22))
 
#define Sigma1(x)   (ROTR(x,6) ^ ROTR(x,11) ^ ROTR(x,25))
 
#define sigma0(x)   (ROTR(x,7) ^ ROTR(x,18) ^ ((x)>>3))
 
#define sigma1(x)   (ROTR(x,17) ^ ROTR(x,19) ^ ((x)>>10))
 

Functions

void mavlink_sha256_init (mavlink_sha256_ctx *m)
 
void mavlink_sha256_update (mavlink_sha256_ctx *m, const void *v, uint32_t len)
 
void mavlink_sha256_final_48 (mavlink_sha256_ctx *m, uint8_t result[6])
 

Macro Definition Documentation

◆ Ch

#define Ch (   x,
  y,
  z 
)    (((x) & (y)) ^ ((~(x)) & (z)))

◆ Maj

#define Maj (   x,
  y,
  z 
)    (((x) & (y)) ^ ((x) & (z)) ^ ((y) & (z)))

◆ MAVLINK_HELPER

#define MAVLINK_HELPER

◆ ROTR

#define ROTR (   x,
  n 
)    (((x)>>(n)) | ((x) << (32 - (n))))

◆ Sigma0

#define Sigma0 (   x)    (ROTR(x,2) ^ ROTR(x,13) ^ ROTR(x,22))

◆ sigma0

#define sigma0 (   x)    (ROTR(x,7) ^ ROTR(x,18) ^ ((x)>>3))

◆ Sigma1

#define Sigma1 (   x)    (ROTR(x,6) ^ ROTR(x,11) ^ ROTR(x,25))

◆ sigma1

#define sigma1 (   x)    (ROTR(x,17) ^ ROTR(x,19) ^ ((x)>>10))

Function Documentation

◆ mavlink_sha256_final_48()

void mavlink_sha256_final_48 ( mavlink_sha256_ctx *  m,
uint8_t  result[6] 
)

◆ mavlink_sha256_init()

void mavlink_sha256_init ( mavlink_sha256_ctx *  m)

◆ mavlink_sha256_update()

void mavlink_sha256_update ( mavlink_sha256_ctx *  m,
const void *  v,
uint32_t  len 
)