Cipherpack v1.2.0-dirty
A Cryprographic Stream Processor
Classes | Typedefs | Functions
crypto1.cpp File Reference
#include <cipherpack/cipherpack.hpp>
#include <cstdint>
#include <jau/debug.hpp>
#include <jau/file_util.hpp>
Include dependency graph for crypto1.cpp:

Go to the source code of this file.

Classes

class  WrappingCipherpackListener
 

Typedefs

typedef std::function< bool(secure_vector< uint8_t > &, bool)> _StreamConsumerFunc
 

Functions

static std::vector< uint8_t > _fingerprint_public (const Botan::Public_Key &key, Botan::HashFunction &hash_func)
 
static uint64_t _read_buffer (jau::io::ByteInStream &in, secure_vector< uint8_t > &buffer) noexcept
 
static uint64_t _read_stream (jau::io::ByteInStream &in, cipherpack::secure_vector< uint8_t > &buffer, const _StreamConsumerFunc &consumer_fn) noexcept
 
static uint64_t _read_stream (jau::io::ByteInStream &in, cipherpack::secure_vector< uint8_t > &buffer1, secure_vector< uint8_t > &buffer2, const _StreamConsumerFunc &consumer_fn) noexcept
 
static PackHeader checkSignThenDecrypt_Impl (const std::vector< std::string > &sign_pub_keys, const std::string &dec_sec_key_fname, const jau::io::secure_string &passphrase, jau::io::ByteInStream &source, CipherpackListenerRef listener, const std::string_view &plaintext_hash_algo)
 
static PackHeader encryptThenSign_Impl (const CryptoConfig &crypto_cfg, const std::vector< std::string > &enc_pub_keys, const std::string &sign_sec_key_fname, const jau::io::secure_string &passphrase, jau::io::ByteInStream &source, const std::string &target_path, const std::string &subject, const std::string &plaintext_version, const std::string &plaintext_version_parent, CipherpackListenerRef listener, const std::string_view &plaintext_hash_algo)
 
static Botan::BigInt to_BigInt (const uint64_t &v)
 
static std::vector< uint8_t > to_OctetString (const std::string &s)
 
static int64_t to_positive_int64_t (const Botan::BigInt &v)
 
static std::string to_string (const std::vector< uint8_t > &v)
 
static uint64_t to_uint64_t (const Botan::BigInt &v)
 

Typedef Documentation

◆ _StreamConsumerFunc

typedef std::function<bool (secure_vector<uint8_t>& , bool )> _StreamConsumerFunc

Definition at line 112 of file crypto1.cpp.

Function Documentation

◆ to_BigInt()

static Botan::BigInt to_BigInt ( const uint64_t &  v)
static

Definition at line 36 of file crypto1.cpp.

Here is the caller graph for this function:

◆ to_uint64_t()

static uint64_t to_uint64_t ( const Botan::BigInt &  v)
static

Definition at line 40 of file crypto1.cpp.

Here is the caller graph for this function:

◆ to_positive_int64_t()

static int64_t to_positive_int64_t ( const Botan::BigInt &  v)
static

Definition at line 54 of file crypto1.cpp.

Here is the caller graph for this function:

◆ to_OctetString()

static std::vector< uint8_t > to_OctetString ( const std::string &  s)
static

Definition at line 68 of file crypto1.cpp.

Here is the caller graph for this function:

◆ to_string()

static std::string to_string ( const std::vector< uint8_t > &  v)
static
Examples
commandline.cpp, and test_01_cipherpack.cpp.

Definition at line 72 of file crypto1.cpp.

Here is the caller graph for this function:

◆ _read_stream() [1/2]

static uint64_t _read_stream ( jau::io::ByteInStream &  in,
cipherpack::secure_vector< uint8_t > &  buffer,
const _StreamConsumerFunc consumer_fn 
)
staticnoexcept

Definition at line 114 of file crypto1.cpp.

Here is the caller graph for this function:

◆ _read_buffer()

static uint64_t _read_buffer ( jau::io::ByteInStream &  in,
secure_vector< uint8_t > &  buffer 
)
staticnoexcept

Definition at line 144 of file crypto1.cpp.

Here is the caller graph for this function:

◆ _read_stream() [2/2]

static uint64_t _read_stream ( jau::io::ByteInStream &  in,
cipherpack::secure_vector< uint8_t > &  buffer1,
secure_vector< uint8_t > &  buffer2,
const _StreamConsumerFunc consumer_fn 
)
staticnoexcept

Definition at line 155 of file crypto1.cpp.

◆ _fingerprint_public()

static std::vector< uint8_t > _fingerprint_public ( const Botan::Public_Key &  key,
Botan::HashFunction &  hash_func 
)
static

Definition at line 214 of file crypto1.cpp.

Here is the caller graph for this function:

◆ encryptThenSign_Impl()

static PackHeader encryptThenSign_Impl ( const CryptoConfig crypto_cfg,
const std::vector< std::string > &  enc_pub_keys,
const std::string &  sign_sec_key_fname,
const jau::io::secure_string &  passphrase,
jau::io::ByteInStream &  source,
const std::string &  target_path,
const std::string &  subject,
const std::string &  plaintext_version,
const std::string &  plaintext_version_parent,
CipherpackListenerRef  listener,
const std::string_view &  plaintext_hash_algo 
)
static

Definition at line 222 of file crypto1.cpp.

Here is the caller graph for this function:

◆ checkSignThenDecrypt_Impl()

static PackHeader checkSignThenDecrypt_Impl ( const std::vector< std::string > &  sign_pub_keys,
const std::string &  dec_sec_key_fname,
const jau::io::secure_string &  passphrase,
jau::io::ByteInStream &  source,
CipherpackListenerRef  listener,
const std::string_view &  plaintext_hash_algo 
)
static

Definition at line 687 of file crypto1.cpp.

Here is the caller graph for this function: