7#include <initializer_list>
12#include <userver/utils/flags.hpp>
14#include <userver/crypto/basic_types.hpp>
15#include <userver/crypto/certificate.hpp>
16#include <userver/crypto/exception.hpp>
17#include <userver/crypto/private_key.hpp>
19USERVER_NAMESPACE_BEGIN
26 explicit Signer(
const std::string& name);
31 std::initializer_list<std::string_view> data)
const = 0;
35class SignerNone
final :
public Signer {
40 std::string
Sign(std::initializer_list<std::string_view> data)
const override;
45class HmacShaSigner
final :
public Signer {
49 ~HmacShaSigner()
override;
52 std::string
Sign(std::initializer_list<std::string_view> data)
const override;
60using SignerHs1 = HmacShaSigner<
DigestSize::k160>;
61using SignerHs256 = HmacShaSigner<
DigestSize::k256>;
62using SignerHs384 = HmacShaSigner<
DigestSize::k384>;
63using SignerHs512 = HmacShaSigner<
DigestSize::k512>;
68class DsaSigner
final :
public Signer {
72 const std::string& password = {});
75 std::string
Sign(std::initializer_list<std::string_view> data)
const override;
140 ~CmsSigner()
override;
143 std::string
Sign(std::initializer_list<std::string_view> data,