ark::crypt::detail::MemoryBio

Defined in header “ark/crypt/detail/memory_bio.hh”.


A wrapper that allows you to allocate a memory-bio to wrap a string buffer, which handles cleanup for you.

Methods

  • MemoryBio()
    Allocates a new BIO suitable for being written to. Use str() to get the contents.

  • MemoryBio(const std::string & value)
    Wraps the given string, throwing if we cannot allocate a BIO. The string must not fall out of scope for the lifetime of this class.

  • ~MemoryBio()
    Releases memory allocated to the BIO.

  • BIO * bio()
    Returns the BIO.

  • std::string str()
    Returns the string contents of the BIO.