Add SHA-1 hashing support
This commit is contained in:
@@ -19,6 +19,7 @@
|
||||
#include <rtl/llist.hh>
|
||||
#include <rtl/math.hh>
|
||||
#include <rtl/memory.hh>
|
||||
#include <rtl/sha1.hh>
|
||||
#include <rtl/string.hh>
|
||||
#include <rtl/widestr.hh>
|
||||
|
||||
|
||||
37
xtoskrnl/includes/rtl/sha1.hh
Normal file
37
xtoskrnl/includes/rtl/sha1.hh
Normal file
@@ -0,0 +1,37 @@
|
||||
/**
|
||||
* PROJECT: ExectOS
|
||||
* COPYRIGHT: See COPYING.md in the top level directory
|
||||
* FILE: xtoskrnl/includes/rtl/sha1.hh
|
||||
* DESCRIPTION: SHA1 computation support
|
||||
* DEVELOPERS: Rafal Kupiec <belliash@codingworkshop.eu.org>
|
||||
*/
|
||||
|
||||
#ifndef __XTOSKRNL_RTL_SHA1_HH
|
||||
#define __XTOSKRNL_RTL_SHA1_HH
|
||||
|
||||
#include <xtos.hh>
|
||||
|
||||
|
||||
/* Runtime Library */
|
||||
namespace RTL
|
||||
{
|
||||
class SHA1
|
||||
{
|
||||
public:
|
||||
STATIC XTAPI XTSTATUS ComputeDigest(IN PCUCHAR Buffer,
|
||||
IN SIZE_T BufferSize,
|
||||
OUT PUCHAR Digest);
|
||||
|
||||
private:
|
||||
STATIC XTAPI VOID ComputeHash(IN OUT PRTL_SHA1_CONTEXT Context,
|
||||
OUT PUCHAR Digest);
|
||||
STATIC XTAPI VOID HashData(IN OUT PRTL_SHA1_CONTEXT Context,
|
||||
IN PCUCHAR Data,
|
||||
IN ULONG Length);
|
||||
STATIC XTAPI XTSTATUS InitializeContext(OUT PRTL_SHA1_CONTEXT Context);
|
||||
STATIC XTAPI VOID TransformData(IN OUT PULONG State,
|
||||
IN PCUCHAR Buffer);
|
||||
};
|
||||
}
|
||||
|
||||
#endif /* __XTOSKRNL_RTL_SHA1_HH */
|
||||
Reference in New Issue
Block a user