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 & decode(bool &)
std::invalid_argument Invalid_Argument
BER_Decoder start_cons(ASN1_Tag, ASN1_Tag=UNIVERSAL)
SecureVector< byte > read_all(message_id msg=DEFAULT_MESSAGE)
std::string lookup(const OID &oid)
std::string encode(const byte der[], size_t length, const std::string &label, size_t width)
std::string as_string() const
DER_Encoder & start_cons(ASN1_Tag type_tag, ASN1_Tag class_tag=UNIVERSAL)
void process_msg(const byte in[], size_t length)
static bool can_compress_with(const std::string &)
void compress(const std::string &)