Added sha256 hash function and hmac functions (with and without salt) to the kernel
and userspace. In userspace, this is accessed through #include <secure.h> In the kernel, this is access through #include <kern/secure.h> There is a unit test for this (hm1) that computes the hmac and compares it to the known value. The salted vesion tested offline. ----- Also, fixed usespace compile issue with not changing KERNEL_SECRET => SECRET.
This commit is contained in:
7
userland/include/secure.h
Normal file
7
userland/include/secure.h
Normal file
@@ -0,0 +1,7 @@
|
||||
#ifndef _SECURE_H_
|
||||
#define _SECURE_H_
|
||||
|
||||
// Just include the kernel verison
|
||||
#include <kern/secure.h>
|
||||
|
||||
#endif //_SECURE_H_
|
@@ -13,6 +13,11 @@ SRCS+=\
|
||||
$(COMMON)/printf/snprintf.c \
|
||||
$(COMMON)/printf/tprintf.c
|
||||
|
||||
# secure
|
||||
SRCS+=\
|
||||
$(COMMON)/secure/secure.c \
|
||||
$(COMMON)/secure/sha256.c \
|
||||
|
||||
# stdio
|
||||
SRCS+=\
|
||||
stdio/__puts.c \
|
||||
|
Reference in New Issue
Block a user