8#ifndef BOTAN_ISO9796_H_
9#define BOTAN_ISO9796_H_
11#include <botan/hash.h>
12#include <botan/internal/emsa.h>
25 explicit ISO_9796_DS2(std::unique_ptr<HashFunction> hash,
bool implicit =
false) :
26 m_hash(std::move(hash)), m_implicit(implicit), m_SALT_SIZE(hash->output_length()) {}
33 ISO_9796_DS2(std::unique_ptr<HashFunction> hash,
bool implicit,
size_t salt_size) :
34 m_hash(std::move(hash)), m_implicit(implicit), m_SALT_SIZE(salt_size) {}
38 std::string
name()
const override;
41 void update(
const uint8_t input[],
size_t length)
override;
43 std::vector<uint8_t> raw_data()
override;
45 std::vector<uint8_t> encoding_of(
const std::vector<uint8_t>& msg,
49 bool verify(
const std::vector<uint8_t>& coded,
const std::vector<uint8_t>& raw,
size_t key_bits)
override;
51 std::unique_ptr<HashFunction> m_hash;
54 std::vector<uint8_t> m_msg_buffer;
66 ISO_9796_DS3(std::unique_ptr<HashFunction> hash,
bool implicit =
false) :
67 m_hash(std::move(hash)), m_implicit(implicit) {}
69 std::string
name()
const override;
74 void update(
const uint8_t input[],
size_t length)
override;
76 std::vector<uint8_t> raw_data()
override;
78 std::vector<uint8_t> encoding_of(
const std::vector<uint8_t>& msg,
82 bool verify(
const std::vector<uint8_t>& coded,
const std::vector<uint8_t>& raw,
size_t key_bits)
override;
84 std::unique_ptr<HashFunction> m_hash;
86 std::vector<uint8_t> m_msg_buffer;
ISO_9796_DS2(std::unique_ptr< HashFunction > hash, bool implicit=false)
std::string name() const override
ISO_9796_DS2(std::unique_ptr< HashFunction > hash, bool implicit, size_t salt_size)
std::string hash_function() const override
std::string hash_function() const override
std::string name() const override
ISO_9796_DS3(std::unique_ptr< HashFunction > hash, bool implicit=false)
int(* update)(CTX *, const void *, CC_LONG len)
int(* final)(unsigned char *, CTX *)