-
Notifications
You must be signed in to change notification settings - Fork 0
/
cpp-base64X.cpp
31 lines (23 loc) · 958 Bytes
/
cpp-base64X.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
/*
This file is part of cpp-base64.
Copyright (C) 2020-2021 ReimuNotMoe <[email protected]>
This program is free software: you can redistribute it and/or modify
it under the terms of the MIT License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*/
#include "cpp-base64X.hpp"
using namespace YukiWorkshop;
Base64X::encode_state Base64X::encode(const void *__input, size_t __len) {
return encode_state{(const char *)__input, __len};
}
Base64X::encode_state Base64X::encode(const char *__input) {
return encode_state{__input, strlen(__input)};
}
Base64X::decode_state Base64X::decode(const void *__input, size_t __len) {
return decode_state((const char *)__input, __len);
}
Base64X::decode_state Base64X::decode(const char *__input) {
return decode_state(__input, strlen(__input));
}