8#include <botan/cms_enc.h>
9#include <botan/cms_dec.h>
10#include <botan/der_enc.h>
11#include <botan/ber_dec.h>
12#include <botan/oids.h>
13#include <botan/pipe.h>
15#if defined(BOTAN_HAS_COMPRESSOR_ZLIB)
16 #include <botan/zlib.h>
31#if defined(BOTAN_HAS_COMPRESSOR_ZLIB)
38 Pipe pipe(compressor);
44 encode(
static_cast<size_t>(0)).
47 raw_bytes(make_econtent(compressed, type)).
50 add_layer(
"CMS.CompressedData", encoder);
61#if defined(BOTAN_HAS_COMPRESSOR_ZLIB)
83 comp_info.
decode(comp_algo);
84 read_econtent(comp_info);
91#if defined(BOTAN_HAS_COMPRESSOR_ZLIB)
102 Pipe pipe(decompressor);
103 pipe.process_msg(data);
104 data = pipe.read_all();
BER_Decoder start_cons(ASN1_Tag, ASN1_Tag=UNIVERSAL)
BER_Decoder & decode(bool &)
void compress(const std::string &)
static bool can_compress_with(const std::string &)
DER_Encoder & start_cons(ASN1_Tag type_tag, ASN1_Tag class_tag=UNIVERSAL)
std::string as_string() const
SecureVector< byte > read_all(message_id msg=DEFAULT_MESSAGE)
void process_msg(const byte in[], size_t length)
std::string lookup(const OID &oid)
std::invalid_argument Invalid_Argument
Decoding_Error(const std::string &name)
Internal_Error(const std::string &err)
Invalid_Algorithm_Name(const std::string &name)