Botan 3.9.0
Crypto and TLS for C&
Botan::Strong< T, TagTypeT, Capabilities > Class Template Reference

#include <strong_type.h>

Inheritance diagram for Botan::Strong< T, TagTypeT, Capabilities >:
Botan::detail::Strong_Adapter< T > Botan::detail::Strong_Base< T > Botan::detail::Container_Strong_Adapter_Base< T > Botan::detail::Strong_Base< T > Botan::detail::Container_Strong_Adapter_Base< T > Botan::detail::Container_Strong_Adapter_Base< T > Botan::detail::Strong_Base< T > Botan::detail::Strong_Base< T > Botan::detail::Strong_Base< T >

Public Types

using const_iterator = typename T::const_iterator
using const_pointer = typename T::const_pointer
using iterator = typename T::iterator
using pointer = typename T::pointer
using size_type = typename T::size_type
using value_type = typename T::value_type
using wrapped_type = T
using wrapped_type = T

Public Member Functions

constexpr void _const_time_poison () const
constexpr void _const_time_unpoison () const
auto all_vartime () const
auto any_vartime () const
template<typename OutT>
auto as () const
template<typename U>
requires (concepts::has_bounds_checked_accessors<T>)
decltype(auto) at (U &&i) const noexcept(noexcept(this->get().at(i)))
template<typename U>
requires (concepts::has_bounds_checked_accessors<T>)
decltype(auto) at (U &&i) noexcept(noexcept(this->get().at(i)))
auto at (size_type i)
auto at (size_type i) const
auto back ()
auto back () const
decltype(auto) begin () const noexcept(noexcept(this->get().begin()))
decltype(auto) begin () noexcept(noexcept(this->get().begin()))
auto capacity () const
decltype(auto) cbegin () const noexcept(noexcept(this->get().cbegin()))
decltype(auto) cbegin () noexcept(noexcept(this->get().cbegin()))
decltype(auto) cend () const noexcept(noexcept(this->get().cend()))
decltype(auto) cend () noexcept(noexcept(this->get().cend()))
decltype(auto) data () const noexcept(noexcept(this->get().data()))
decltype(auto) data () noexcept(noexcept(this->get().data()))
bool empty () const noexcept(noexcept(this->get().empty()))
decltype(auto) end () const noexcept(noexcept(this->get().end()))
decltype(auto) end () noexcept(noexcept(this->get().end()))
template<bitvectorish OtherT>
auto equals (const OtherT &other) const
auto flip ()
auto flip (size_type i)
auto from_bytes (std::span< const uint8_t > bytes, std::optional< size_type > bits=std::nullopt)
auto front ()
auto front () const
constexpr T & get () &
constexpr T & get () &
constexpr T && get () &&
constexpr T && get () &&
constexpr const T & get () const &
constexpr const T & get () const &
constexpr const T && get () const &&
constexpr const T && get () const &&
auto hamming_weight () const
auto has_odd_hamming_weight () const
auto none_vartime () const
template<typename U>
decltype(auto) operator[] (U &&i) const noexcept(noexcept(this->get().operator[](i)))
template<typename U>
decltype(auto) operator[] (U &&i) noexcept(noexcept(this->get().operator[](i)))
auto pop_back ()
auto push_back (bool b)
auto reserve (size_type n)
void resize (size_type size) noexcept(noexcept(this->get().resize(size)))
auto set (size_type i)
size_type size () const noexcept(noexcept(this->get().size()))
template<typename OutT>
requires (std::unsigned_integral<strong_type_wrapped_type<OutT>> && !std::same_as<bool, strong_type_wrapped_type<OutT>>)
auto subvector (size_type pos) const
template<bitvectorish OutT = T>
auto subvector (size_type pos, std::optional< size_type > length=std::nullopt) const
template<typename InT>
requires (std::unsigned_integral<strong_type_wrapped_type<InT>> && !std::same_as<bool, InT>)
void subvector_replace (size_type pos, InT value)
template<typename OutT = T>
auto to_bytes () const
auto to_bytes (std::span< uint8_t > out) const
auto to_string () const
auto unset (size_type i)

Static Public Member Functions

template<typename CapabilityT>
static constexpr bool has_capability ()

Detailed Description

template<typename T, typename TagTypeT, typename... Capabilities>
class Botan::Strong< T, TagTypeT, Capabilities >

Strong types can be used as wrappers around common types to provide compile time semantics. They usually contribute to more maintainable and less error-prone code especially when dealing with function parameters.

Internally, this provides adapters so that the wrapping strong type behaves as much as the underlying type as possible and desirable.

This implementation was inspired by: https://stackoverflow.com/a/69030899

Definition at line 198 of file strong_type.h.

Member Typedef Documentation

◆ const_iterator

template<concepts::container T>
using Botan::detail::Container_Strong_Adapter_Base< T >::const_iterator = typename T::const_iterator
inherited

Definition at line 79 of file strong_type.h.

◆ const_pointer

template<concepts::container T>
using Botan::detail::Strong_Adapter< T >::const_pointer = typename T::const_pointer
inherited

Definition at line 163 of file strong_type.h.

◆ iterator

template<concepts::container T>
using Botan::detail::Container_Strong_Adapter_Base< T >::iterator = typename T::iterator
inherited

Definition at line 78 of file strong_type.h.

◆ pointer

template<concepts::container T>
using Botan::detail::Strong_Adapter< T >::pointer = typename T::pointer
inherited

Definition at line 162 of file strong_type.h.

◆ size_type

template<concepts::container T>
using Botan::detail::Strong_Adapter< T >::size_type = typename T::size_type
inherited

Definition at line 1366 of file bitvector.h.

◆ value_type

template<concepts::container T>
using Botan::detail::Container_Strong_Adapter_Base< T >::value_type = typename T::value_type
inherited

Definition at line 76 of file strong_type.h.

◆ wrapped_type [1/2]

template<typename T>
using Botan::detail::Strong_Base< T >::wrapped_type = T
inherited

Definition at line 40 of file strong_type.h.

◆ wrapped_type [2/2]

template<typename T>
using Botan::detail::Strong_Base< T >::wrapped_type = T
inherited

Definition at line 40 of file strong_type.h.

Member Function Documentation

◆ _const_time_poison()

template<concepts::container T>
void Botan::detail::Strong_Adapter< T >::_const_time_poison ( ) const
inlineconstexprinherited

Definition at line 1450 of file bitvector.h.

1450{ this->get()._const_time_poison(); }

References Botan::detail::Strong_Base< T >::get().

◆ _const_time_unpoison()

template<concepts::container T>
void Botan::detail::Strong_Adapter< T >::_const_time_unpoison ( ) const
inlineconstexprinherited

Definition at line 1452 of file bitvector.h.

1452{ this->get()._const_time_unpoison(); }

References Botan::detail::Strong_Base< T >::get().

◆ all_vartime()

template<concepts::container T>
auto Botan::detail::Strong_Adapter< T >::all_vartime ( ) const
inlineinherited

Definition at line 1425 of file bitvector.h.

1425{ return this->get().all_vartime(); }

References Botan::detail::Strong_Base< T >::get().

◆ any_vartime()

template<concepts::container T>
auto Botan::detail::Strong_Adapter< T >::any_vartime ( ) const
inlineinherited

Definition at line 1423 of file bitvector.h.

1423{ return this->get().any_vartime(); }

References Botan::detail::Strong_Base< T >::get().

◆ as()

template<concepts::container T>
template<typename OutT>
auto Botan::detail::Strong_Adapter< T >::as ( ) const
inlineinherited

Definition at line 1384 of file bitvector.h.

1384 {
1385 return this->get().template as<OutT>();
1386 }

References Botan::detail::Strong_Base< T >::get().

◆ at() [1/4]

template<concepts::container T>
template<typename U>
requires (concepts::has_bounds_checked_accessors<T>)
decltype(auto) Botan::detail::Container_Strong_Adapter_Base< T >::at ( U && i) const
inlinenoexceptinherited

Definition at line 139 of file strong_type.h.

141 {
142 return this->get().at(std::forward<U>(i));
143 }

References Botan::detail::Strong_Base< T >::get().

◆ at() [2/4]

template<concepts::container T>
template<typename U>
requires (concepts::has_bounds_checked_accessors<T>)
decltype(auto) Botan::detail::Container_Strong_Adapter_Base< T >::at ( U && i)
inlinenoexceptinherited

Definition at line 146 of file strong_type.h.

148 {
149 return this->get().at(std::forward<U>(i));
150 }

References Botan::detail::Strong_Base< T >::get().

◆ at() [3/4]

template<concepts::container T>
auto Botan::detail::Strong_Adapter< T >::at ( size_type i)
inlineinherited

Definition at line 1373 of file bitvector.h.

1373{ return this->get().at(i); }

References Botan::detail::Strong_Base< T >::get().

◆ at() [4/4]

template<concepts::container T>
auto Botan::detail::Strong_Adapter< T >::at ( size_type i) const
inlineinherited

◆ back() [1/2]

template<concepts::container T>
auto Botan::detail::Strong_Adapter< T >::back ( )
inlineinherited

Definition at line 1421 of file bitvector.h.

1421{ return this->get().back(); }

References Botan::detail::Strong_Base< T >::get().

◆ back() [2/2]

template<concepts::container T>
auto Botan::detail::Strong_Adapter< T >::back ( ) const
inlineinherited

Definition at line 1419 of file bitvector.h.

1419{ return this->get().back(); }

References Botan::detail::Strong_Base< T >::get().

◆ begin() [1/2]

template<concepts::container T>
decltype(auto) Botan::detail::Container_Strong_Adapter_Base< T >::begin ( ) const
inlinenoexceptinherited

Definition at line 94 of file strong_type.h.

94{ return this->get().begin(); }

References Botan::detail::Strong_Base< T >::get().

◆ begin() [2/2]

◆ capacity()

template<concepts::container T>
auto Botan::detail::Strong_Adapter< T >::capacity ( ) const
inlineinherited

Definition at line 1446 of file bitvector.h.

1446{ return this->get().capacity(); }

References Botan::detail::Strong_Base< T >::get().

◆ cbegin() [1/2]

template<concepts::container T>
decltype(auto) Botan::detail::Container_Strong_Adapter_Base< T >::cbegin ( ) const
inlinenoexceptinherited

Definition at line 102 of file strong_type.h.

102{ return this->get().cbegin(); }

References Botan::detail::Strong_Base< T >::get().

◆ cbegin() [2/2]

template<concepts::container T>
decltype(auto) Botan::detail::Container_Strong_Adapter_Base< T >::cbegin ( )
inlinenoexceptinherited

Definition at line 100 of file strong_type.h.

100{ return this->get().cbegin(); }

References Botan::detail::Strong_Base< T >::get().

◆ cend() [1/2]

template<concepts::container T>
decltype(auto) Botan::detail::Container_Strong_Adapter_Base< T >::cend ( ) const
inlinenoexceptinherited

Definition at line 106 of file strong_type.h.

106{ return this->get().cend(); }

References Botan::detail::Strong_Base< T >::get().

◆ cend() [2/2]

template<concepts::container T>
decltype(auto) Botan::detail::Container_Strong_Adapter_Base< T >::cend ( )
inlinenoexceptinherited

Definition at line 104 of file strong_type.h.

104{ return this->get().cend(); }

References Botan::detail::Strong_Base< T >::get().

◆ data() [1/2]

template<concepts::container T>
decltype(auto) Botan::detail::Strong_Adapter< T >::data ( ) const
inlinenoexceptinherited

Definition at line 181 of file strong_type.h.

181{ return this->get().data(); }

References Botan::detail::Strong_Base< T >::get().

◆ data() [2/2]

template<concepts::container T>
decltype(auto) Botan::detail::Strong_Adapter< T >::data ( )
inlinenoexceptinherited

◆ empty()

template<concepts::container T>
bool Botan::detail::Container_Strong_Adapter_Base< T >::empty ( ) const
inlinenoexceptinherited

Definition at line 110 of file strong_type.h.

112 {
113 return this->get().empty();
114 }

References empty(), and Botan::detail::Strong_Base< T >::get().

Referenced by empty(), and Botan::TLS::Client_Hello_12::session_handle().

◆ end() [1/2]

template<concepts::container T>
decltype(auto) Botan::detail::Container_Strong_Adapter_Base< T >::end ( ) const
inlinenoexceptinherited

Definition at line 98 of file strong_type.h.

98{ return this->get().end(); }

References Botan::detail::Strong_Base< T >::get().

◆ end() [2/2]

◆ equals()

template<concepts::container T>
template<bitvectorish OtherT>
auto Botan::detail::Strong_Adapter< T >::equals ( const OtherT & other) const
inlineinherited

Definition at line 1407 of file bitvector.h.

1407 {
1408 return this->get().equals(other);
1409 }

References Botan::detail::Strong_Base< T >::get().

◆ flip() [1/2]

template<concepts::container T>
auto Botan::detail::Strong_Adapter< T >::flip ( )
inlineinherited

Definition at line 1381 of file bitvector.h.

1381{ return this->get().flip(); }

References Botan::detail::Strong_Base< T >::get().

◆ flip() [2/2]

template<concepts::container T>
auto Botan::detail::Strong_Adapter< T >::flip ( size_type i)
inlineinherited

Definition at line 1379 of file bitvector.h.

1379{ return this->get().flip(i); }

References Botan::detail::Strong_Base< T >::get().

◆ from_bytes()

template<concepts::container T>
auto Botan::detail::Strong_Adapter< T >::from_bytes ( std::span< const uint8_t > bytes,
std::optional< size_type > bits = std::nullopt )
inlineinherited

Definition at line 1433 of file bitvector.h.

1433 {
1434 return this->get().from_bytes(bytes, bits);
1435 }

References Botan::detail::Strong_Base< T >::get().

◆ front() [1/2]

template<concepts::container T>
auto Botan::detail::Strong_Adapter< T >::front ( )
inlineinherited

Definition at line 1417 of file bitvector.h.

1417{ return this->get().front(); }

References Botan::detail::Strong_Base< T >::get().

◆ front() [2/2]

template<concepts::container T>
auto Botan::detail::Strong_Adapter< T >::front ( ) const
inlineinherited

Definition at line 1415 of file bitvector.h.

1415{ return this->get().front(); }

References Botan::detail::Strong_Base< T >::get().

◆ get() [1/8]

template<typename T>
T & Botan::detail::Strong_Base< T >::get ( ) &
inlineconstexprinherited

Definition at line 52 of file strong_type.h.

52{ return m_value; }

Referenced by Botan::detail::Strong_Adapter< T >::_const_time_poison(), Botan::detail::Strong_Adapter< T >::_const_time_unpoison(), Botan::detail::Strong_Adapter< T >::all_vartime(), Botan::detail::Strong_Adapter< T >::any_vartime(), Botan::detail::Strong_Adapter< T >::as(), Botan::detail::Container_Strong_Adapter_Base< T >::at(), Botan::detail::Container_Strong_Adapter_Base< T >::at(), Botan::detail::Strong_Adapter< T >::at(), Botan::detail::Strong_Adapter< T >::at(), Botan::detail::Strong_Adapter< T >::back(), Botan::detail::Strong_Adapter< T >::back(), Botan::detail::Container_Strong_Adapter_Base< T >::begin(), Botan::detail::Container_Strong_Adapter_Base< T >::begin(), Botan::detail::Strong_Adapter< T >::capacity(), Botan::detail::Container_Strong_Adapter_Base< T >::cbegin(), Botan::detail::Container_Strong_Adapter_Base< T >::cbegin(), Botan::detail::Container_Strong_Adapter_Base< T >::cend(), Botan::detail::Container_Strong_Adapter_Base< T >::cend(), Botan::chain_lengths(), Botan::compute_root(), Botan::detail::Strong_Adapter< T >::data(), Botan::detail::Strong_Adapter< T >::data(), Botan::detail::Container_Strong_Adapter_Base< T >::empty(), Botan::detail::Container_Strong_Adapter_Base< T >::end(), Botan::detail::Container_Strong_Adapter_Base< T >::end(), Botan::detail::Strong_Adapter< T >::equals(), Botan::GF_Mask::expand(), Botan::detail::Strong_Adapter< T >::flip(), Botan::detail::Strong_Adapter< T >::flip(), Botan::detail::Strong_Adapter< T >::from_bytes(), Botan::detail::Strong_Adapter< T >::front(), Botan::detail::Strong_Adapter< T >::front(), Botan::detail::Strong_Adapter< T >::hamming_weight(), Botan::detail::Strong_Adapter< T >::has_odd_hamming_weight(), Botan::ht_sign(), Botan::ht_verify(), Botan::GF_Mask::if_set_return(), Botan::GF_Mask::is_equal(), Botan::GF_Mask::is_lte(), Botan::GF_Mask::is_zero(), Botan::detail::Strong_Adapter< T >::none_vartime(), Botan::operator&(), Botan::operator&(), Botan::operator&(), Botan::operator&=(), Botan::operator&=(), Botan::Classic_McEliece_GF::operator*(), Botan::operator*(), Botan::operator*(), Botan::operator*(), Botan::operator*=(), Botan::operator*=(), Botan::operator+(), Botan::operator+(), Botan::operator+(), Botan::operator++(), Botan::operator++(), Botan::operator+=(), Botan::operator+=(), Botan::operator-(), Botan::operator-(), Botan::operator-(), Botan::operator--(), Botan::operator--(), Botan::operator-=(), Botan::operator-=(), Botan::operator/(), Botan::operator/(), Botan::operator/(), Botan::operator/=(), Botan::operator/=(), Botan::operator<<(), Botan::operator<<(), Botan::operator<<(), Botan::operator<<(), Botan::operator<<=(), Botan::operator<<=(), Botan::operator<=>(), Botan::operator<=>(), Botan::operator<=>(), Botan::operator==(), Botan::operator==(), Botan::operator==(), Botan::operator>>(), Botan::operator>>(), Botan::operator>>(), Botan::operator>>=(), Botan::operator>>=(), Botan::detail::Container_Strong_Adapter_Base< T >::operator[](), Botan::detail::Container_Strong_Adapter_Base< T >::operator[](), Botan::operator^(), Botan::operator^(), Botan::operator^(), Botan::operator^=(), Botan::operator^=(), Botan::operator|(), Botan::operator|(), Botan::operator|(), Botan::operator|=(), Botan::operator|=(), Botan::HSS_LMS_Params::params_at_level(), Botan::detail::Strong_Adapter< T >::pop_back(), Botan::TLS::Cipher_State::psk(), Botan::detail::Strong_Adapter< T >::push_back(), Botan::Classic_McEliece_Encryptor::raw_kem_encrypt(), Botan::detail::Container_Strong_Adapter_Base< T >::reserve(), Botan::detail::Strong_Adapter< T >::reserve(), Botan::detail::Container_Strong_Adapter_Base< T >::resize(), Botan::GF_Mask::select(), Botan::GF_Mask::select(), Botan::detail::Strong_Adapter< T >::set(), Botan::Sphincs_Address::set_chain_address(), Botan::Sphincs_Address::set_hash_address(), Botan::Sphincs_Address::set_keypair_address(), Botan::Sphincs_Address::set_layer_address(), Botan::Sphincs_Address::set_tree_address(), Botan::Sphincs_Address::set_tree_height(), Botan::Sphincs_Address::set_tree_index(), Botan::HSS_LMS_PrivateKeyInternal::sign(), Botan::LMS_PrivateKey::sign_and_get_pk(), Botan::HSS_Signature::signed_pub_key(), Botan::detail::Container_Strong_Adapter_Base< T >::size(), Botan::detail::Strong_Adapter< T >::subvector(), Botan::detail::Strong_Adapter< T >::subvector(), Botan::detail::Strong_Adapter< T >::subvector_replace(), Botan::detail::Strong_Adapter< T >::to_bytes(), Botan::detail::Strong_Adapter< T >::to_bytes(), Botan::detail::Strong_Adapter< T >::to_string(), Botan::treehash(), Botan::detail::Strong_Adapter< T >::unset(), Botan::wots_public_key_from_signature(), and Botan::x448().

◆ get() [2/8]

template<typename T>
T & Botan::detail::Strong_Base< T >::get ( ) &
inlineconstexprinherited

Definition at line 52 of file strong_type.h.

52{ return m_value; }

Referenced by Botan::detail::Strong_Adapter< T >::_const_time_poison(), Botan::detail::Strong_Adapter< T >::_const_time_unpoison(), Botan::detail::Strong_Adapter< T >::all_vartime(), Botan::detail::Strong_Adapter< T >::any_vartime(), Botan::detail::Strong_Adapter< T >::as(), Botan::detail::Container_Strong_Adapter_Base< T >::at(), Botan::detail::Container_Strong_Adapter_Base< T >::at(), Botan::detail::Strong_Adapter< T >::at(), Botan::detail::Strong_Adapter< T >::at(), Botan::detail::Strong_Adapter< T >::back(), Botan::detail::Strong_Adapter< T >::back(), Botan::detail::Container_Strong_Adapter_Base< T >::begin(), Botan::detail::Container_Strong_Adapter_Base< T >::begin(), Botan::detail::Strong_Adapter< T >::capacity(), Botan::detail::Container_Strong_Adapter_Base< T >::cbegin(), Botan::detail::Container_Strong_Adapter_Base< T >::cbegin(), Botan::detail::Container_Strong_Adapter_Base< T >::cend(), Botan::detail::Container_Strong_Adapter_Base< T >::cend(), Botan::chain_lengths(), Botan::compute_root(), Botan::detail::Strong_Adapter< T >::data(), Botan::detail::Strong_Adapter< T >::data(), Botan::detail::Container_Strong_Adapter_Base< T >::empty(), Botan::detail::Container_Strong_Adapter_Base< T >::end(), Botan::detail::Container_Strong_Adapter_Base< T >::end(), Botan::detail::Strong_Adapter< T >::equals(), Botan::GF_Mask::expand(), Botan::detail::Strong_Adapter< T >::flip(), Botan::detail::Strong_Adapter< T >::flip(), Botan::detail::Strong_Adapter< T >::from_bytes(), Botan::detail::Strong_Adapter< T >::front(), Botan::detail::Strong_Adapter< T >::front(), Botan::detail::Strong_Adapter< T >::hamming_weight(), Botan::detail::Strong_Adapter< T >::has_odd_hamming_weight(), Botan::ht_sign(), Botan::ht_verify(), Botan::GF_Mask::if_set_return(), Botan::GF_Mask::is_equal(), Botan::GF_Mask::is_lte(), Botan::GF_Mask::is_zero(), Botan::detail::Strong_Adapter< T >::none_vartime(), Botan::operator&(), Botan::operator&(), Botan::operator&(), Botan::operator&=(), Botan::operator&=(), Botan::Classic_McEliece_GF::operator*(), Botan::operator*(), Botan::operator*(), Botan::operator*(), Botan::operator*=(), Botan::operator*=(), Botan::operator+(), Botan::operator+(), Botan::operator+(), Botan::operator++(), Botan::operator++(), Botan::operator+=(), Botan::operator+=(), Botan::operator-(), Botan::operator-(), Botan::operator-(), Botan::operator--(), Botan::operator--(), Botan::operator-=(), Botan::operator-=(), Botan::operator/(), Botan::operator/(), Botan::operator/(), Botan::operator/=(), Botan::operator/=(), Botan::operator<<(), Botan::operator<<(), Botan::operator<<(), Botan::operator<<(), Botan::operator<<=(), Botan::operator<<=(), Botan::operator<=>(), Botan::operator<=>(), Botan::operator<=>(), Botan::operator==(), Botan::operator==(), Botan::operator==(), Botan::operator>>(), Botan::operator>>(), Botan::operator>>(), Botan::operator>>=(), Botan::operator>>=(), Botan::detail::Container_Strong_Adapter_Base< T >::operator[](), Botan::detail::Container_Strong_Adapter_Base< T >::operator[](), Botan::operator^(), Botan::operator^(), Botan::operator^(), Botan::operator^=(), Botan::operator^=(), Botan::operator|(), Botan::operator|(), Botan::operator|(), Botan::operator|=(), Botan::operator|=(), Botan::HSS_LMS_Params::params_at_level(), Botan::detail::Strong_Adapter< T >::pop_back(), Botan::TLS::Cipher_State::psk(), Botan::detail::Strong_Adapter< T >::push_back(), Botan::Classic_McEliece_Encryptor::raw_kem_encrypt(), Botan::detail::Container_Strong_Adapter_Base< T >::reserve(), Botan::detail::Strong_Adapter< T >::reserve(), Botan::detail::Container_Strong_Adapter_Base< T >::resize(), Botan::GF_Mask::select(), Botan::GF_Mask::select(), Botan::detail::Strong_Adapter< T >::set(), Botan::Sphincs_Address::set_chain_address(), Botan::Sphincs_Address::set_hash_address(), Botan::Sphincs_Address::set_keypair_address(), Botan::Sphincs_Address::set_layer_address(), Botan::Sphincs_Address::set_tree_address(), Botan::Sphincs_Address::set_tree_height(), Botan::Sphincs_Address::set_tree_index(), Botan::HSS_LMS_PrivateKeyInternal::sign(), Botan::LMS_PrivateKey::sign_and_get_pk(), Botan::HSS_Signature::signed_pub_key(), Botan::detail::Container_Strong_Adapter_Base< T >::size(), Botan::detail::Strong_Adapter< T >::subvector(), Botan::detail::Strong_Adapter< T >::subvector(), Botan::detail::Strong_Adapter< T >::subvector_replace(), Botan::detail::Strong_Adapter< T >::to_bytes(), Botan::detail::Strong_Adapter< T >::to_bytes(), Botan::detail::Strong_Adapter< T >::to_string(), Botan::treehash(), Botan::detail::Strong_Adapter< T >::unset(), Botan::wots_public_key_from_signature(), and Botan::x448().

◆ get() [3/8]

template<typename T>
T && Botan::detail::Strong_Base< T >::get ( ) &&
inlineconstexprinherited

Definition at line 56 of file strong_type.h.

56{ return std::move(m_value); }

◆ get() [4/8]

template<typename T>
T && Botan::detail::Strong_Base< T >::get ( ) &&
inlineconstexprinherited

Definition at line 56 of file strong_type.h.

56{ return std::move(m_value); }

◆ get() [5/8]

template<typename T>
const T & Botan::detail::Strong_Base< T >::get ( ) const &
inlineconstexprinherited

Definition at line 54 of file strong_type.h.

54{ return m_value; }

◆ get() [6/8]

template<typename T>
const T & Botan::detail::Strong_Base< T >::get ( ) const &
inlineconstexprinherited

Definition at line 54 of file strong_type.h.

54{ return m_value; }

◆ get() [7/8]

template<typename T>
const T && Botan::detail::Strong_Base< T >::get ( ) const &&
inlineconstexprinherited

Definition at line 58 of file strong_type.h.

58{ return std::move(m_value); }

◆ get() [8/8]

template<typename T>
const T && Botan::detail::Strong_Base< T >::get ( ) const &&
inlineconstexprinherited

Definition at line 58 of file strong_type.h.

58{ return std::move(m_value); }

◆ hamming_weight()

template<concepts::container T>
auto Botan::detail::Strong_Adapter< T >::hamming_weight ( ) const
inlineinherited

Definition at line 1431 of file bitvector.h.

1431{ return this->get().hamming_weight(); }

References Botan::detail::Strong_Base< T >::get().

◆ has_capability()

template<typename T, typename TagTypeT, typename... Capabilities>
template<typename CapabilityT>
constexpr bool Botan::Strong< T, TagTypeT, Capabilities >::has_capability ( )
inlinestaticconstexpr

Definition at line 203 of file strong_type.h.

◆ has_odd_hamming_weight()

template<concepts::container T>
auto Botan::detail::Strong_Adapter< T >::has_odd_hamming_weight ( ) const
inlineinherited

Definition at line 1429 of file bitvector.h.

1429{ return this->get().has_odd_hamming_weight(); }

References Botan::detail::Strong_Base< T >::get().

◆ none_vartime()

template<concepts::container T>
auto Botan::detail::Strong_Adapter< T >::none_vartime ( ) const
inlineinherited

Definition at line 1427 of file bitvector.h.

1427{ return this->get().none_vartime(); }

References Botan::detail::Strong_Base< T >::get().

◆ operator[]() [1/2]

template<concepts::container T>
template<typename U>
decltype(auto) Botan::detail::Container_Strong_Adapter_Base< T >::operator[] ( U && i) const
inlinenoexceptinherited

Definition at line 129 of file strong_type.h.

129 {
130 return this->get()[std::forward<U>(i)];
131 }

References Botan::detail::Strong_Base< T >::get().

◆ operator[]() [2/2]

template<concepts::container T>
template<typename U>
decltype(auto) Botan::detail::Container_Strong_Adapter_Base< T >::operator[] ( U && i)
inlinenoexceptinherited

Definition at line 134 of file strong_type.h.

134 {
135 return this->get()[std::forward<U>(i)];
136 }

References Botan::detail::Strong_Base< T >::get().

◆ pop_back()

template<concepts::container T>
auto Botan::detail::Strong_Adapter< T >::pop_back ( )
inlineinherited

Definition at line 1413 of file bitvector.h.

1413{ return this->get().pop_back(); }

References Botan::detail::Strong_Base< T >::get().

◆ push_back()

template<concepts::container T>
auto Botan::detail::Strong_Adapter< T >::push_back ( bool b)
inlineinherited

Definition at line 1411 of file bitvector.h.

1411{ return this->get().push_back(b); }

References Botan::detail::Strong_Base< T >::get().

◆ reserve()

template<concepts::container T>
auto Botan::detail::Strong_Adapter< T >::reserve ( size_type n)
inlineinherited

Definition at line 1448 of file bitvector.h.

1448{ return this->get().reserve(n); }

References Botan::detail::Strong_Base< T >::get().

◆ resize()

template<concepts::container T>
void Botan::detail::Container_Strong_Adapter_Base< T >::resize ( size_type size)
inlinenoexceptinherited

Definition at line 116 of file strong_type.h.

118 {
119 this->get().resize(size);
120 }
size_type size() const noexcept(noexcept(this->get().size()))

References Botan::detail::Strong_Base< T >::get(), and size().

◆ set()

template<concepts::container T>
auto Botan::detail::Strong_Adapter< T >::set ( size_type i)
inlineinherited

Definition at line 1375 of file bitvector.h.

1375{ return this->get().set(i); }

References Botan::detail::Strong_Base< T >::get().

◆ size()

◆ subvector() [1/2]

template<concepts::container T>
template<typename OutT>
requires (std::unsigned_integral<strong_type_wrapped_type<OutT>> && !std::same_as<bool, strong_type_wrapped_type<OutT>>)
auto Botan::detail::Strong_Adapter< T >::subvector ( size_type pos) const
inlineinherited

Definition at line 1396 of file bitvector.h.

1396 {
1397 return this->get().template subvector<OutT>(pos);
1398 }
auto subvector(size_type pos, std::optional< size_type > length=std::nullopt) const
Definition bitvector.h:1389

References Botan::detail::Strong_Base< T >::get(), and subvector().

◆ subvector() [2/2]

template<concepts::container T>
template<bitvectorish OutT = T>
auto Botan::detail::Strong_Adapter< T >::subvector ( size_type pos,
std::optional< size_type > length = std::nullopt ) const
inlineinherited

Definition at line 1389 of file bitvector.h.

1389 {
1390 return this->get().template subvector<OutT>(pos, length);
1391 }

References Botan::detail::Strong_Base< T >::get(), and subvector().

Referenced by Botan::Classic_McEliece_Matrix::mul(), subvector(), and subvector().

◆ subvector_replace()

template<concepts::container T>
template<typename InT>
requires (std::unsigned_integral<strong_type_wrapped_type<InT>> && !std::same_as<bool, InT>)
void Botan::detail::Strong_Adapter< T >::subvector_replace ( size_type pos,
InT value )
inlineinherited

Definition at line 1402 of file bitvector.h.

1402 {
1403 return this->get().subvector_replace(pos, value);
1404 }

References Botan::detail::Strong_Base< T >::get().

◆ to_bytes() [1/2]

template<concepts::container T>
template<typename OutT = T>
auto Botan::detail::Strong_Adapter< T >::to_bytes ( ) const
inlineinherited

Definition at line 1438 of file bitvector.h.

1438 {
1439 return this->get().template to_bytes<OutT>();
1440 }

References Botan::detail::Strong_Base< T >::get(), and to_bytes().

Referenced by to_bytes().

◆ to_bytes() [2/2]

template<concepts::container T>
auto Botan::detail::Strong_Adapter< T >::to_bytes ( std::span< uint8_t > out) const
inlineinherited

Definition at line 1442 of file bitvector.h.

1442{ return this->get().to_bytes(out); }

References Botan::detail::Strong_Base< T >::get().

◆ to_string()

template<concepts::container T>
auto Botan::detail::Strong_Adapter< T >::to_string ( ) const
inlineinherited

Definition at line 1444 of file bitvector.h.

1444{ return this->get().to_string(); }

References Botan::detail::Strong_Base< T >::get().

◆ unset()

template<concepts::container T>
auto Botan::detail::Strong_Adapter< T >::unset ( size_type i)
inlineinherited

Definition at line 1377 of file bitvector.h.

1377{ return this->get().unset(i); }

References Botan::detail::Strong_Base< T >::get().


The documentation for this class was generated from the following files: