File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -31,11 +31,11 @@ extern "C" {
3131
3232/* *
3333 * convert input data to base64
34- * @param data uint8_t *
34+ * @param data const uint8_t *
3535 * @param length size_t
3636 * @return String
3737 */
38- String base64::encode (uint8_t * data, size_t length)
38+ String base64::encode (const uint8_t * data, size_t length)
3939{
4040 size_t size = base64_encode_expected_len (length) + 1 ;
4141 char * buffer = (char *) malloc (size);
@@ -54,10 +54,10 @@ String base64::encode(uint8_t * data, size_t length)
5454
5555/* *
5656 * convert input data to base64
57- * @param text String
57+ * @param text const String&
5858 * @return String
5959 */
60- String base64::encode (String text)
60+ String base64::encode (const String& text)
6161{
6262 return base64::encode ((uint8_t *) text.c_str (), text.length ());
6363}
Original file line number Diff line number Diff line change 44class base64
55{
66public:
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);
99private:
1010};
1111
You can’t perform that action at this time.
0 commit comments