8#include <botan/pss_params.h>
10#include <botan/assert.h>
11#include <botan/ber_dec.h>
12#include <botan/der_enc.h>
13#include <botan/internal/algorithm_spec.h>
14#include <botan/internal/fmt.h>
22 const auto m = spec.
match(
"PSS|PSS_Raw({hash},MGF1,{salt_len:int})");
24 throw Invalid_Argument(
fmt(
"PSS_Params::from_padding_name unexpected param '{}'", padding_name));
27 return PSS_Params(m->str(
"hash"), m->integer(
"salt_len"));
39 this->decode_from(decoder);
44 std::vector<uint8_t> output;
66 const size_t default_salt_len = 20;
67 const size_t default_trailer = 1;
79 throw Decoding_Error(
"Unexpected parameters for PSS hash algorithm identifier");
std::vector< uint8_t > BER_encode() const
bool parameters_are_null_or_empty() const
const std::vector< uint8_t > & parameters() const
std::optional< AlgorithmMatch > match(const AlgorithmPattern &pattern) const &
BER_Decoder & decode(bool &out)
BER_Decoder & verify_end()
BER_Decoder start_sequence()
BER_Decoder & decode_optional(T &out, ASN1_Type type_tag, ASN1_Class class_tag, const T &default_value=T())
DER_Encoder & start_context_specific(uint32_t tag)
DER_Encoder & start_sequence()
DER_Encoder & encode(bool b)
static PSS_Params from_padding_name(std::string_view padding_name)
void encode_into(DER_Encoder &to) const override
std::vector< uint8_t > serialize() const
PSS_Params(std::string_view hash_fn, size_t salt_len)
@ ExplicitContextSpecific
std::string fmt(std::string_view format, const T &... args)