mirror of
https://github.com/matrix-construct/construct
synced 2024-11-29 10:12:39 +01:00
ircd: Add b64encoded_unpadded variant.
This commit is contained in:
parent
7745082fb0
commit
0eb10c0495
2 changed files with 8 additions and 0 deletions
|
@ -50,6 +50,7 @@ namespace ircd
|
|||
|
||||
// Binary <-> Base64 conversion suite
|
||||
string_view b64encode(const mutable_buffer &out, const const_raw_buffer &in);
|
||||
string_view b64encode_unpadded(const mutable_buffer &out, const const_raw_buffer &in);
|
||||
}
|
||||
|
||||
namespace ircd
|
||||
|
|
|
@ -561,6 +561,13 @@ ircd::try_lex_cast<long double>(const string_view &s)
|
|||
// ircd/stringops.h
|
||||
//
|
||||
|
||||
ircd::string_view
|
||||
ircd::b64encode_unpadded(const mutable_buffer &out,
|
||||
const const_raw_buffer &in)
|
||||
{
|
||||
return rstrip(b64encode(out, in), '=');
|
||||
}
|
||||
|
||||
ircd::string_view
|
||||
ircd::b64encode(const mutable_buffer &out,
|
||||
const const_raw_buffer &in)
|
||||
|
|
Loading…
Reference in a new issue