libQuotient
A Qt library for building matrix clients
Loading...
Searching...
No Matches
cryptoutils.h File Reference
#include "e2ee_common.h"
#include <expected>
Include dependency graph for cryptoutils.h:

Go to the source code of this file.

Namespaces

namespace  Quotient
 

Typedefs

using Quotient::SslErrorCode = unsigned long
 
template<typename T >
using Quotient::SslExpected = std::expected< T, SslErrorCode >
 

Enumerations

enum  Quotient::SslErrorCodes : SslErrorCode { Quotient::SslErrorUserOffset = 128 , Quotient::WrongDerivedKeyLength = SslErrorUserOffset + 1 , Quotient::SslPayloadTooLong = SslErrorUserOffset + 2 }
 

Functions

QByteArray Quotient::zeroedByteArray (QByteArray::size_type n=32)
 
template<size_t N = std::dynamic_extent>
auto Quotient::asWritableCBytes (auto &buf)
 Obtain a std::span<byte_t, N> looking into the passed buffer.
 
QUOTIENT_API SslExpected< QByteArray > Quotient::aesCtr256Decrypt (const QByteArray &ciphertext, byte_view_t< Aes256KeySize > key, byte_view_t< AesBlockSize > iv)
 Decrypt data using AES-CTR-256.
 

Variables

constexpr auto Quotient::Aes256KeySize = 32u
 
constexpr auto Quotient::AesBlockSize = 16u
 
constexpr auto Quotient::HmacKeySize = 32u