Botan 3.5.0
Crypto and TLS for C&
Botan::detail::Strong_Adapter< T > Class Template Reference

#include <strong_type.h>

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

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
 

Public Member Functions

decltype(auto) begin () const noexcept(noexcept(this->get().begin()))
 
decltype(auto) begin () noexcept(noexcept(this->get().begin()))
 
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()))
 
Tget ()
 
const Tget () const
 
decltype(auto) operator[] (size_type i) const noexcept(noexcept(this->get().operator[](i)))
 
decltype(auto) operator[] (size_type i) noexcept(noexcept(this->get().operator[](i)))
 
void reserve (size_type size) noexcept(noexcept(this->get().reserve(size)))
 
void resize (size_type size) noexcept(noexcept(this->get().resize(size)))
 
size_type size () const noexcept(noexcept(this->get().size()))
 
 Strong_Adapter (const char *str)
 
template<typename InputIt >
 Strong_Adapter (InputIt begin, InputIt end)
 
 Strong_Adapter (size_t size)
 
 Strong_Adapter (std::span< const value_type > span)
 

Detailed Description

template<concepts::container T>
class Botan::detail::Strong_Adapter< T >

Definition at line 68 of file strong_type.h.

Member Typedef Documentation

◆ const_iterator

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

Definition at line 73 of file strong_type.h.

◆ const_pointer

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

Definition at line 75 of file strong_type.h.

◆ iterator

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

Definition at line 72 of file strong_type.h.

◆ pointer

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

Definition at line 74 of file strong_type.h.

◆ size_type

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

Definition at line 71 of file strong_type.h.

◆ value_type

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

Definition at line 70 of file strong_type.h.

◆ wrapped_type

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

Definition at line 39 of file strong_type.h.

Constructor & Destructor Documentation

◆ Strong_Adapter() [1/4]

template<concepts::container T>
Botan::detail::Strong_Adapter< T >::Strong_Adapter ( std::span< const value_type > span)
inlineexplicit

Definition at line 80 of file strong_type.h.

82 : Strong_Adapter(T(span.begin(), span.end())) {}
Strong_Adapter(std::span< const value_type > span)
Definition strong_type.h:80
FE_25519 T
Definition ge.cpp:34

◆ Strong_Adapter() [2/4]

template<concepts::container T>
Botan::detail::Strong_Adapter< T >::Strong_Adapter ( size_t size)
inlineexplicit

Definition at line 84 of file strong_type.h.

86 : Strong_Adapter(T(size)) {}
size_type size() const noexcept(noexcept(this->get().size()))

◆ Strong_Adapter() [3/4]

template<concepts::container T>
template<typename InputIt >
Botan::detail::Strong_Adapter< T >::Strong_Adapter ( InputIt begin,
InputIt end )
inline

Definition at line 89 of file strong_type.h.

decltype(auto) begin() noexcept(noexcept(this->get().begin()))
Definition strong_type.h:99
decltype(auto) end() noexcept(noexcept(this->get().end()))

◆ Strong_Adapter() [4/4]

template<concepts::container T>
Botan::detail::Strong_Adapter< T >::Strong_Adapter ( const char * str)
inlineexplicit

Definition at line 94 of file strong_type.h.

96 : Strong_Adapter(std::string(str)) {}

Member Function Documentation

◆ begin() [1/2]

template<concepts::container T>
decltype(auto) Botan::detail::Strong_Adapter< T >::begin ( ) const
inlinenoexcept

Definition at line 101 of file strong_type.h.

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

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

◆ begin() [2/2]

template<concepts::container T>
decltype(auto) Botan::detail::Strong_Adapter< T >::begin ( )
inlinenoexcept

Definition at line 99 of file strong_type.h.

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

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

Referenced by Botan::encode_point(), Botan::Kyber_PrivateKey::Kyber_PrivateKey(), and Botan::wots_sign_and_pkgen().

◆ cbegin() [1/2]

template<concepts::container T>
decltype(auto) Botan::detail::Strong_Adapter< T >::cbegin ( ) const
inlinenoexcept

Definition at line 109 of file strong_type.h.

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

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

◆ cbegin() [2/2]

template<concepts::container T>
decltype(auto) Botan::detail::Strong_Adapter< T >::cbegin ( )
inlinenoexcept

Definition at line 107 of file strong_type.h.

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

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

◆ cend() [1/2]

template<concepts::container T>
decltype(auto) Botan::detail::Strong_Adapter< T >::cend ( ) const
inlinenoexcept

Definition at line 113 of file strong_type.h.

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

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

◆ cend() [2/2]

template<concepts::container T>
decltype(auto) Botan::detail::Strong_Adapter< T >::cend ( )
inlinenoexcept

Definition at line 111 of file strong_type.h.

111{ 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
inlinenoexcept

Definition at line 123 of file strong_type.h.

125 {
126 return this->get().data();
127 }

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

◆ data() [2/2]

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

Definition at line 117 of file strong_type.h.

119 {
120 return this->get().data();
121 }

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

Referenced by Botan::FrodoMatrix::serialize().

◆ empty()

template<concepts::container T>
bool Botan::detail::Strong_Adapter< T >::empty ( ) const
inlinenoexcept

Definition at line 129 of file strong_type.h.

131 {
132 return this->get().empty();
133 }

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

◆ end() [1/2]

template<concepts::container T>
decltype(auto) Botan::detail::Strong_Adapter< T >::end ( ) const
inlinenoexcept

Definition at line 105 of file strong_type.h.

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

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

◆ end() [2/2]

template<concepts::container T>
decltype(auto) Botan::detail::Strong_Adapter< T >::end ( )
inlinenoexcept

Definition at line 103 of file strong_type.h.

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

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

Referenced by Botan::encode_point().

◆ get() [1/2]

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

Definition at line 50 of file strong_type.h.

50{ return m_value; }

Referenced by begin(), begin(), cbegin(), cbegin(), cend(), cend(), Botan::chain_lengths(), Botan::compute_root(), data(), data(), empty(), end(), end(), Botan::ht_sign(), Botan::ht_verify(), Botan::LMOTS_Private_Key::LMOTS_Private_Key(), 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::operator>>(), Botan::operator>>(), Botan::operator>>(), Botan::operator>>=(), Botan::operator>>=(), operator[](), 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::TLS::Cipher_State::psk(), reserve(), resize(), Botan::TLS::New_Session_Ticket_12::serialize(), Botan::TLS::New_Session_Ticket_13::serialize(), Botan::Sphincs_Address::set_chain(), Botan::Sphincs_Address::set_hash(), Botan::Sphincs_Address::set_keypair(), Botan::Sphincs_Address::set_layer(), Botan::Sphincs_Address::set_tree(), 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(), size(), Botan::treehash(), Botan::wots_public_key_from_signature(), and Botan::x448().

◆ get() [2/2]

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

Definition at line 52 of file strong_type.h.

52{ return m_value; }

◆ operator[]() [1/2]

template<concepts::container T>
decltype(auto) Botan::detail::Strong_Adapter< T >::operator[] ( size_type i) const
inlinenoexcept

Definition at line 147 of file strong_type.h.

147 {
148 return this->get()[i];
149 }

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

◆ operator[]() [2/2]

template<concepts::container T>
decltype(auto) Botan::detail::Strong_Adapter< T >::operator[] ( size_type i)
inlinenoexcept

Definition at line 151 of file strong_type.h.

151{ return this->get()[i]; }

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

◆ reserve()

template<concepts::container T>
void Botan::detail::Strong_Adapter< T >::reserve ( size_type size)
inlinenoexcept

Definition at line 141 of file strong_type.h.

143 {
144 this->get().reserve(size);
145 }

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

◆ resize()

template<concepts::container T>
void Botan::detail::Strong_Adapter< T >::resize ( size_type size)
inlinenoexcept

Definition at line 135 of file strong_type.h.

137 {
138 this->get().resize(size);
139 }

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

◆ size()

template<concepts::container T>
size_type Botan::detail::Strong_Adapter< T >::size ( ) const
inlinenoexcept

Definition at line 115 of file strong_type.h.

115{ return this->get().size(); }

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

Referenced by Botan::Kyber_PrivateKey::Kyber_PrivateKey().


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