MCPcopy Create free account
hub / github.com/ceph/ceph / decode_base64

Method decode_base64

src/common/buffer.cc:1711–1724  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1709}
1710
1711void buffer::list::decode_base64(buffer::list& e)
1712{
1713 bufferptr bp(4 + ((e.length() * 3) / 4));
1714 int l = ceph_unarmor(bp.c_str(), bp.c_str() + bp.length(), e.c_str(), e.c_str() + e.length());
1715 if (l < 0) {
1716 std::ostringstream oss;
1717 oss << "decode_base64: decoding failed:\n";
1718 hexdump(oss);
1719 throw buffer::malformed_input(oss.str().c_str());
1720 }
1721 ceph_assert(l <= (int)bp.length());
1722 bp.set_length(l);
1723 push_back(std::move(bp));
1724}
1725
1726ssize_t buffer::list::pread_file(const char *fn, uint64_t off, uint64_t len, std::string *error)
1727{

Callers 14

mainFunction · 0.45
peer_bootstrap_importMethod · 0.45
as_binaryMethod · 0.45
decode_xml_objFunction · 0.45
get_policyMethod · 0.45
TESTFunction · 0.45
TESTFunction · 0.45
TEST_FFunction · 0.45
decode_json_objFunction · 0.45
load_from_keyfileFunction · 0.45
load_from_keyFunction · 0.45
callMethod · 0.45

Calls 8

ceph_unarmorFunction · 0.85
hexdumpFunction · 0.85
set_lengthMethod · 0.80
malformed_inputClass · 0.70
push_backFunction · 0.50
lengthMethod · 0.45
c_strMethod · 0.45
strMethod · 0.45

Tested by 3

TESTFunction · 0.36
TESTFunction · 0.36
TEST_FFunction · 0.36