Commit 0189b832 authored by JINMEI Tatuya's avatar JINMEI Tatuya
Browse files

cleanup: avoid using a magic number directly


git-svn-id: svn://bind10.isc.org/svn/bind10/trunk@983 e5f2f494-b856-4b98-b285-d166d9295462
parent 842d9903
......@@ -33,6 +33,7 @@ namespace isc {
namespace dns {
namespace {
const char BASE64_PADDING_CHAR = '=';
const char BINARY_ZERO_CODE = 0;
typedef
......@@ -86,12 +87,11 @@ encodeBase64(const vector<char>& binary)
binary.end())),
base64_encoder(BinaryNormalizer(binary.end(), binary.end())));
assert(len >= base64.length());
base64.append(len - base64.length(), '=');
base64.append(len - base64.length(), BASE64_PADDING_CHAR);
return (base64);
}
namespace {
const char BASE64_PADDING_CHAR = '=';
const size_t BASE64_MAX_PADDING_CHARS = 2;
const char BASE64_ZERO_CODE = 'A'; // correspond to 000000(2)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment