Botan 3.6.1
Crypto and TLS for C&
|
#include <strong_type.h>
Public Types | |
using | const_pointer = typename underlying_span::const_pointer |
using | iterator = typename underlying_span::iterator |
using | pointer = typename underlying_span::pointer |
using | size_type = typename underlying_span::size_type |
using | value_type = typename underlying_span::value_type |
Public Member Functions | |
decltype(auto) | begin () const noexcept(noexcept(this->m_span.begin())) |
decltype(auto) | begin () noexcept(noexcept(this->m_span.begin())) |
decltype(auto) | data () const noexcept(noexcept(this->m_span.data())) |
decltype(auto) | data () noexcept(noexcept(this->m_span.data())) |
bool | empty () const noexcept(noexcept(this->m_span.empty())) |
decltype(auto) | end () const noexcept(noexcept(this->m_span.end())) |
decltype(auto) | end () noexcept(noexcept(this->m_span.end())) |
underlying_span | get () |
underlying_span | get () const |
decltype(auto) | operator[] (typename underlying_span::size_type i) const noexcept |
decltype(auto) | size () const noexcept(noexcept(this->m_span.size())) |
StrongSpan ()=default | |
StrongSpan (const StrongSpan &other)=default | |
template<concepts::contiguous_strong_type T2, typename = std::enable_if_t<std::is_same_v<T2, std::remove_const_t<T>>>> | |
StrongSpan (const StrongSpan< T2 > &other) | |
StrongSpan (T &strong) | |
StrongSpan (underlying_span span) | |
~StrongSpan ()=default | |
This mimmicks a std::span but keeps track of the strong-type information. Use this when you would want to use const Strong<...>&
as a parameter declaration. In particular this allows assigning strong-type information to slices of a bigger buffer without copying the bytes. E.g:
using Foo = Strong<std::vector<uint8_t>, Foo_>;
void bar(StrongSpan<Foo> foo) { ... }
std::vector<uint8_t> buffer; BufferSlicer slicer(buffer); bar(slicer.take<Foo>()); // This does not copy the data from buffer but // just annotates the 'Foo' strong-type info.
Definition at line 614 of file strong_type.h.
using Botan::StrongSpan< T >::const_pointer = typename underlying_span::const_pointer |
Definition at line 623 of file strong_type.h.
using Botan::StrongSpan< T >::iterator = typename underlying_span::iterator |
Definition at line 621 of file strong_type.h.
using Botan::StrongSpan< T >::pointer = typename underlying_span::pointer |
Definition at line 622 of file strong_type.h.
using Botan::StrongSpan< T >::size_type = typename underlying_span::size_type |
Definition at line 620 of file strong_type.h.
using Botan::StrongSpan< T >::value_type = typename underlying_span::value_type |
Definition at line 619 of file strong_type.h.
|
default |
|
inlineexplicit |
Definition at line 627 of file strong_type.h.
|
inline |
Definition at line 629 of file strong_type.h.
|
inline |
Definition at line 643 of file strong_type.h.
|
default |
|
default |
|
inlinenoexcept |
Definition at line 669 of file strong_type.h.
|
inlinenoexcept |
Definition at line 667 of file strong_type.h.
Referenced by Botan::Sphincs_Hash_Functions_Sha2::PRF_msg().
|
inlinenoexcept |
Definition at line 661 of file strong_type.h.
|
inlinenoexcept |
Definition at line 659 of file strong_type.h.
Referenced by Botan::Kyber_KEM_Decryptor::decapsulate(), Botan::ML_KEM_Decryptor::decapsulate(), Botan::FrodoMatrix::deserialize(), and Botan::FrodoMatrix::sample().
|
inlinenoexcept |
Definition at line 665 of file strong_type.h.
|
inlinenoexcept |
Definition at line 673 of file strong_type.h.
|
inlinenoexcept |
Definition at line 671 of file strong_type.h.
|
inline |
Definition at line 657 of file strong_type.h.
|
inline |
Definition at line 652 of file strong_type.h.
Referenced by Botan::treehash().
|
inlinenoexcept |
Definition at line 675 of file strong_type.h.
|
inlinenoexcept |
Definition at line 663 of file strong_type.h.
Referenced by Botan::compute_root(), Botan::compute_root(), Botan::Kyber_KEM_Decryptor::decapsulate(), Botan::ML_KEM_Decryptor::decapsulate(), Botan::Dilithium_Algos::decode_public_key(), Botan::Kyber_Algos::decompress_ciphertext(), Botan::FrodoMatrix::deserialize(), Botan::FrodoMatrix::encode(), Botan::fors_sign_and_pkgen(), Botan::ht_sign(), Botan::ht_verify(), Botan::FrodoMatrix::pack(), Botan::Kyber_Algos::polynomial_from_message(), Botan::Sphincs_Hash_Functions_Sha2::PRF_msg(), Botan::FrodoMatrix::sample(), Botan::Kyber_Algos::sample_matrix(), Botan::LMOTS_Private_Key::sign(), Botan::LMS_PrivateKey::sign_and_get_pk(), Botan::treehash(), Botan::treehash(), and Botan::FrodoMatrix::unpack().