8#include <botan/pk_keys.h>
10#include <botan/der_enc.h>
11#include <botan/hash.h>
13#include <botan/pk_ops.h>
14#include <botan/internal/fmt.h>
32 const std::string hex_hash =
hex_encode(hash_fn->process(bits, bits_len));
36 for(
size_t i = 0; i != hex_hash.size(); i += 2) {
38 fprint.push_back(
':');
41 fprint.push_back(hex_hash[i]);
42 fprint.push_back(hex_hash[i + 1]);
49 std::vector<uint8_t> output;
61 const size_t PKCS8_VERSION = 0;
92 std::string_view )
const {
97 std::string_view )
const {
102 std::string_view )
const {
107 std::string_view )
const {
113 std::string_view )
const {
119 std::string_view )
const {
125 std::string_view )
const {
131 std::string_view )
const {
virtual std::string algo_name() const =0
virtual const BigInt & get_int_field(std::string_view field) const
virtual OID object_identifier() const
secure_vector< uint8_t > get_contents()
DER_Encoder & start_sequence()
DER_Encoder & encode(bool b)
static std::unique_ptr< HashFunction > create_or_throw(std::string_view algo_spec, std::string_view provider="")
static OID from_string(std::string_view str)
virtual std::unique_ptr< PK_Ops::Signature > create_signature_op(RandomNumberGenerator &rng, std::string_view params, std::string_view provider) const
std::string fingerprint_private(std::string_view alg) const
virtual std::unique_ptr< PK_Ops::Decryption > create_decryption_op(RandomNumberGenerator &rng, std::string_view params, std::string_view provider) const
virtual std::unique_ptr< PK_Ops::Key_Agreement > create_key_agreement_op(RandomNumberGenerator &rng, std::string_view params, std::string_view provider) const
virtual AlgorithmIdentifier pkcs8_algorithm_identifier() const
virtual secure_vector< uint8_t > raw_private_key_bits() const
secure_vector< uint8_t > private_key_info() const
virtual std::unique_ptr< PK_Ops::KEM_Decryption > create_kem_decryption_op(RandomNumberGenerator &rng, std::string_view params, std::string_view provider) const
virtual secure_vector< uint8_t > private_key_bits() const =0
std::string fingerprint_public(std::string_view alg="SHA-256") const
virtual AlgorithmIdentifier algorithm_identifier() const =0
virtual std::vector< uint8_t > public_key_bits() const =0
virtual std::unique_ptr< PK_Ops::Encryption > create_encryption_op(RandomNumberGenerator &rng, std::string_view params, std::string_view provider) const
virtual std::unique_ptr< PK_Ops::Verification > create_verification_op(std::string_view params, std::string_view provider) const
virtual std::unique_ptr< PK_Ops::Verification > create_x509_verification_op(const AlgorithmIdentifier &signature_algorithm, std::string_view provider) const
virtual std::unique_ptr< PK_Ops::KEM_Encryption > create_kem_encryption_op(std::string_view params, std::string_view provider) const
std::vector< uint8_t > subject_public_key() const
std::string fmt(std::string_view format, const T &... args)
void hex_encode(char output[], const uint8_t input[], size_t input_length, bool uppercase)
std::string create_hex_fingerprint(const uint8_t bits[], size_t bits_len, std::string_view hash_name)
std::vector< T, secure_allocator< T > > secure_vector