|
Android-cuttlefish cvd tool
|
#include <assert.h>#include <errno.h>#include <getopt.h>#include <dirent.h>#include <stdarg.h>#include <stdio.h>#include <stdlib.h>#include <string.h>#include <mntent.h>#include <sys/ioctl.h>#include <sys/stat.h>#include <sys/types.h>#include <fcntl.h>#include <termios.h>#include <unistd.h>#include <signal.h>#include <linux/fs.h>
Classes | |
| struct | sha512_state |
| struct | hash_state |
Macros | |
| #define | F2FS_SHA512_LENGTH 64 |
| #define | CONST64(n) n |
| #define | Ch(x, y, z) (z ^ (x & (y ^ z))) |
| #define | Maj(x, y, z) (((x | y) & z) | (x & y)) |
| #define | S(x, n) ROR64c(x, n) |
| #define | R(x, n) (((x)&CONST64(0xFFFFFFFFFFFFFFFF))>>((__u64)n)) |
| #define | Sigma0(x) (S(x, 28) ^ S(x, 34) ^ S(x, 39)) |
| #define | Sigma1(x) (S(x, 14) ^ S(x, 18) ^ S(x, 41)) |
| #define | Gamma0(x) (S(x, 1) ^ S(x, 8) ^ R(x, 7)) |
| #define | Gamma1(x) (S(x, 19) ^ S(x, 61) ^ R(x, 6)) |
| #define | RND(a, b, c, d, e, f, g, h, i) |
| #define | STORE64H(x, y) |
| #define | LOAD64H(x, y) |
| #define | ROR64c(x, y) |
| #define | MIN(x, y) ( ((x)<(y))?(x):(y) ) |
| #define | SHA512_BLOCKSIZE 128 |
Functions | |
| static void | sha512_compress (struct hash_state *md, const unsigned char *buf) |
| static void | sha512_init (struct hash_state *md) |
| static void | sha512_done (struct hash_state *md, unsigned char *out) |
| static void | sha512_process (struct hash_state *md, const unsigned char *in, unsigned long inlen) |
| void | f2fs_sha512 (const unsigned char *in, unsigned long in_size, unsigned char out[F2FS_SHA512_LENGTH]) |
Variables | |
| static const __u64 | K [80] |
| #define Ch | ( | x, | |
| y, | |||
| z | |||
| ) | (z ^ (x & (y ^ z))) |
| #define CONST64 | ( | n | ) | n |
| #define F2FS_SHA512_LENGTH 64 |
| #define LOAD64H | ( | x, | |
| y | |||
| ) |
| #define Maj | ( | x, | |
| y, | |||
| z | |||
| ) | (((x | y) & z) | (x & y)) |
| #define MIN | ( | x, | |
| y | |||
| ) | ( ((x)<(y))?(x):(y) ) |
| #define RND | ( | a, | |
| b, | |||
| c, | |||
| d, | |||
| e, | |||
| f, | |||
| g, | |||
| h, | |||
| i | |||
| ) |
| #define ROR64c | ( | x, | |
| y | |||
| ) |
| #define S | ( | x, | |
| n | |||
| ) | ROR64c(x, n) |
| #define SHA512_BLOCKSIZE 128 |
| #define STORE64H | ( | x, | |
| y | |||
| ) |
| void f2fs_sha512 | ( | const unsigned char * | in, |
| unsigned long | in_size, | ||
| unsigned char | out[F2FS_SHA512_LENGTH] | ||
| ) |
|
static |
|
static |
|
static |
|
static |
|
static |