1234567891011121314151617181920212223242526272829303132333435363738394041module juptune.data.base;
struct Base64Alphabet(
char Char62,
char Char63,
Base64Padding Padding_,
char CharPad,
Flag!(
"base64AllowLines"
) AllowLines_,
string LineBreak_,
uint MaxLineLength_
)
{
/++ FUNCTIONS ++/
///
uint charToSextet(char c);
///
char sextetToChar(uint sextet);
/++ MANIFEST CONSTANTS ++/
///
enum int AllowLines = AllowLines_;
///
enum int MaxLineLength = MaxLineLength_;
///
enum int Pad1 = CharPad;
///
enum int Padding = Padding_;
///
enum int Zero = 'A';
/++ VARIABLES ++/
///
immutable auto LineBreak;
///
immutable auto Pad2;
}
Describes a base64 alphabet. You may want to use the aliases instead of using this directly.
Pretty much all base64 alphabets are the same beyond the 62nd and 63rd characters, and the padding character, so those are the only ones that are configurable.
| Name | Description |
|---|---|
| AllowLines | |
| MaxLineLength | |
| Pad1 | |
| Padding | |
| Zero |
| Name | Description |
|---|---|
| charToSextet | |
| sextetToChar |
| Name | Description |
|---|---|
| LineBreak | |
| Pad2 |