Skip to content

Commit 7f86f0e

Browse files
committed
b64 rename encode in stdEncode
1 parent 4900feb commit 7f86f0e

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

src/ECP256Certificate.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ int ECP256Certificate::signCSR(byte * signature)
133133

134134
String ECP256Certificate::getCSRPEM()
135135
{
136-
return b64::encode(_certBuffer, _certBufferLen, "-----BEGIN CERTIFICATE REQUEST-----\n", "\n-----END CERTIFICATE REQUEST-----\n");
136+
return b64::stdEncode(_certBuffer, _certBufferLen, "-----BEGIN CERTIFICATE REQUEST-----\n", "\n-----END CERTIFICATE REQUEST-----\n");
137137
}
138138

139139
int ECP256Certificate::buildCert()
@@ -272,7 +272,7 @@ int ECP256Certificate::signCert()
272272

273273
String ECP256Certificate::getCertPEM()
274274
{
275-
return b64::encode(_certBuffer, _certBufferLen, "-----BEGIN CERTIFICATE-----\n", "\n-----END CERTIFICATE-----\n");
275+
return b64::stdEncode(_certBuffer, _certBufferLen, "-----BEGIN CERTIFICATE-----\n", "\n-----END CERTIFICATE-----\n");
276276
}
277277

278278
void ECP256Certificate::getDateFromCompressedData(DateInfo& date) {

src/utility/SElementBase64.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ String urlEncode(const byte in[], unsigned int length) {
5050
return out;
5151
}
5252

53-
String encode(const byte in[], unsigned int length, const char* prefix, const char* suffix) {
53+
String stdEncode(const byte in[], unsigned int length, const char* prefix, const char* suffix) {
5454
static const char* CODES = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
5555

5656
int b;

src/utility/SElementBase64.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,6 @@
1515
namespace arduino { namespace b64 {
1616

1717
String urlEncode(const byte in[], unsigned int length);
18-
String encode(const byte in[], unsigned int length, const char* prefix, const char* suffix);
18+
String stdEncode(const byte in[], unsigned int length, const char* prefix, const char* suffix);
1919

2020
}} // arduino::b64

src/utility/SElementJWS.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ String SElementJWS::publicKey(SecureElement & se, int slot, bool newPrivateKey)
3838

3939
appendPublicKey(publicKey, out);
4040

41-
return b64::encode(out, length, "-----BEGIN PUBLIC KEY-----\n", "\n-----END PUBLIC KEY-----\n");
41+
return b64::stdEncode(out, length, "-----BEGIN PUBLIC KEY-----\n", "\n-----END PUBLIC KEY-----\n");
4242
}
4343

4444
String SElementJWS::sign(SecureElement & se, int slot, const char* header, const char* payload)

0 commit comments

Comments
 (0)