File tree 2 files changed +6
-6
lines changed
2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -31,11 +31,11 @@ extern "C" {
31
31
32
32
/* *
33
33
* convert input data to base64
34
- * @param data uint8_t *
34
+ * @param data const uint8_t *
35
35
* @param length size_t
36
36
* @return String
37
37
*/
38
- String base64::encode (uint8_t * data, size_t length)
38
+ String base64::encode (const uint8_t * data, size_t length)
39
39
{
40
40
size_t size = base64_encode_expected_len (length) + 1 ;
41
41
char * buffer = (char *) malloc (size);
@@ -54,10 +54,10 @@ String base64::encode(uint8_t * data, size_t length)
54
54
55
55
/* *
56
56
* convert input data to base64
57
- * @param text String
57
+ * @param text const String&
58
58
* @return String
59
59
*/
60
- String base64::encode (String text)
60
+ String base64::encode (const String& text)
61
61
{
62
62
return base64::encode ((uint8_t *) text.c_str (), text.length ());
63
63
}
Original file line number Diff line number Diff line change 4
4
class base64
5
5
{
6
6
public:
7
- static String encode (uint8_t * data, size_t length);
8
- static String encode (String text);
7
+ static String encode (const uint8_t * data, size_t length);
8
+ static String encode (const String& text);
9
9
private:
10
10
};
11
11
You can’t perform that action at this time.
0 commit comments