37 lines
1.2 KiB
C++
37 lines
1.2 KiB
C++
/*
|
|
OmniaFramework - A collection of useful functionality
|
|
Copyright (C) 2025 OmniaX-Dev
|
|
|
|
This file is part of OmniaFramework.
|
|
|
|
OmniaFramework is free software: you can redistribute it and/or modify
|
|
it under the terms of the GNU General Public License as published by
|
|
the Free Software Foundation, either version 3 of the License, or
|
|
(at your option) any later version.
|
|
|
|
OmniaFramework is distributed in the hope that it will be useful,
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
GNU General Public License for more details.
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
along with OmniaFramework. If not, see <https://www.gnu.org/licenses/>.
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <ostd/string/String.hpp>
|
|
|
|
namespace ostd
|
|
{
|
|
class Hash
|
|
{
|
|
public:
|
|
static String md5(const String& str);
|
|
|
|
private:
|
|
static void __md5_transform(const uint8_t block[64], uint32_t state[4]);
|
|
static void __md5_encode(uint8_t* output, const uint32_t* input, size_t len);
|
|
static void __md5_decode(uint32_t* output, const uint8_t* input, size_t len);
|
|
};
|
|
}
|