Digest-BLAKE2
view release on metacpan or search on metacpan
stringencoders/modp_b64.h view on Meta::CPAN
inline std::string b64_encode(const std::string& s)
{
return b64_encode(s.data(), s.size());
}
/**
* base 64 encode a string (self-modifing)
*
* This function is for C++ only (duh)
*
* \param[in,out] s the string to be decoded
* \return a reference to the input string
*/
inline std::string& b64_encode(std::string& s)
{
std::string x(b64_encode(s.data(), s.size()));
s.swap(x);
return s;
}
inline std::string b64_decode(const char* src, size_t len)
stringencoders/modp_b64.h view on Meta::CPAN
{
return b64_decode(src, strlen(src));
}
/**
* base 64 decode a string (self-modifing)
* On failure, the string is empty.
*
* This function is for C++ only (duh)
*
* \param[in,out] s the string to be decoded
* \return a reference to the input string
*/
inline std::string& b64_decode(std::string& s)
{
std::string x(b64_decode(s.data(), s.size()));
s.swap(x);
return s;
}
inline std::string b64_decode(const std::string& s)
stringencoders/modp_b64r.h view on Meta::CPAN
inline std::string b64r_encode(const std::string& s)
{
return b64r_encode(s.data(), s.size());
}
/** \brief self-modifing b64r encode
*
* web-safe base 64 decode a string (self-modifing)
* On failure, the string is empty.
*
* \param[in,out] s the string to be decoded
* \return a reference to the input string
*/
inline std::string& b64r_encode(std::string& s)
{
std::string x(b64r_encode(s.data(), s.size()));
s.swap(x);
return s;
}
inline std::string b64r_decode(const char* src, size_t len)
stringencoders/modp_b64r.h view on Meta::CPAN
{
return b64r_decode(src, strlen(src));
}
/**
* base 64 decode a string (self-modifing)
* On failure, the string is empty.
*
* This function is for C++ only (duh)
*
* \param[in,out] s the string to be decoded
* \return a reference to the input string
*/
inline std::string& b64r_decode(std::string& s)
{
std::string x(b64r_decode(s.data(), s.size()));
s.swap(x);
return s;
}
inline std::string b64r_decode(const std::string& s)
stringencoders/modp_b64w.h view on Meta::CPAN
inline std::string b64w_encode(const std::string& s)
{
return b64w_encode(s.data(), s.size());
}
/** \brief self-modifing b64w encode
*
* web-safe base 64 decode a string (self-modifing)
* On failure, the string is empty.
*
* \param[in,out] s the string to be decoded
* \return a reference to the input string
*/
inline std::string& b64w_encode(std::string& s)
{
std::string x(b64w_encode(s.data(), s.size()));
s.swap(x);
return s;
}
inline std::string b64w_decode(const char* src, size_t len)
stringencoders/modp_b64w.h view on Meta::CPAN
{
return b64w_decode(src, strlen(src));
}
/**
* base 64 decode a string (self-modifing)
* On failure, the string is empty.
*
* This function is for C++ only (duh)
*
* \param[in,out] s the string to be decoded
* \return a reference to the input string
*/
inline std::string& b64w_decode(std::string& s)
{
std::string x(b64w_decode(s.data(), s.size()));
s.swap(x);
return s;
}
inline std::string b64w_decode(const std::string& s)
( run in 0.241 second using v1.01-cache-2.11-cpan-a9ef4e587e4 )