commit x64 compilation from lulu cause the other branch dont seems to compile properly at home

This commit is contained in:
2026-07-17 16:08:20 +02:00
parent c0f3eeb00d
commit 0efa4ee6f7
625 changed files with 117283 additions and 4426 deletions

View File

@ -0,0 +1,47 @@
/* -----------------------------------------------------------------------------
GSFramework
Copyright 2001-2013 Emmanuel Julien. All Rights Reserved.
----------------------------------------------------------------------------- */
#include "hash/nsha1.h"
#include "hash/sha1.h"
#include "container/narray.h"
#include "nstring/nstring.h"
using namespace GS;
//------------------------------------------------------------------------------
void SHA1::ComputeHash(const String &source, Array <unsigned char> &hash)
{
if (hash.Allocate(20))
sha1::calc(source.c_str(), source.Len(), hash.c_ptr());
}
String SHA1::ComputeHexa(const String &source)
{
Array <unsigned char> hash;
ComputeHash(source, hash);
char hex[41];
sha1::toHexString(hash.c_ptr(), hex);
return String(hex);
}
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
void SHA1::ComputeHash(const Array <char> &data, Array <unsigned char> &hash)
{
if (hash.Allocate(20))
sha1::calc(data.c_ptr(), data.GetSize(), hash.c_ptr());
}
String SHA1::ComputeHexa(const Array <char> &data)
{
Array <unsigned char> hash;
ComputeHash(data, hash);
char hex[41];
sha1::toHexString(hash.c_ptr(), hex);
return String(hex);
}
//------------------------------------------------------------------------------