AUI Framework  master
Cross-platform base for C++ UI apps
Loading...
Searching...
No Matches
AHash.h
    1/*
    2 * AUI Framework - Declarative UI toolkit for modern C++20
    3 * Copyright (C) 2020-2025 Alex2772 and Contributors
    4 *
    5 * SPDX-License-Identifier: MPL-2.0
    6 *
    7 * This Source Code Form is subject to the terms of the Mozilla Public
    8 * License, v. 2.0. If a copy of the MPL was not distributed with this
    9 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
   10 */
   11
   12//
   13// Created by alex2 on 23.09.2020.
   14//
   15
   16#pragma once
   17
   18
   19#include <AUI/Common/AByteBuffer.h>
   20
   25namespace AHash {
   26    [[nodiscard]] API_AUI_CRYPT AByteBuffer sha512(AByteBufferView in);
   27    [[nodiscard]] API_AUI_CRYPT AByteBuffer sha512(aui::no_escape<IInputStream> in);
   28
   29    [[nodiscard]] API_AUI_CRYPT AByteBuffer sha256(AByteBufferView in);
   30    [[nodiscard]] API_AUI_CRYPT AByteBuffer sha256(aui::no_escape<IInputStream> in);
   31
   32    [[nodiscard]] API_AUI_CRYPT AByteBuffer sha1(AByteBufferView in);
   33    [[nodiscard]] API_AUI_CRYPT AByteBuffer sha1(aui::no_escape<IInputStream> in);
   34
   35    [[nodiscard]] API_AUI_CRYPT AByteBuffer md5(AByteBufferView in);
   36    [[nodiscard]] API_AUI_CRYPT AByteBuffer md5(aui::no_escape<IInputStream> in);
   37
   38    [[nodiscard]] API_AUI_CRYPT AByteBuffer sha256hmac(AByteBufferView in, AByteBufferView key);
   39}
   40
   41
Acts like std::string_view but for AByteBuffer.
Definition AByteBufferView.h:24
std::vector-like growing array for byte storage.
Definition AByteBuffer.h:31
Various hash functions.
Definition AHash.h:25
Does not allow escaping, allowing to accept lvalue ref, rvalue ref, shared_ptr and etc without overhe...
Definition values.h:128