X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=RIC-E2-TERMINATION%2Fbase64.h;h=f2f7b6f39865fd63adbb473d997162fcab1c4805;hb=2f72016b83eb0a1515f861f1a44b74e11e68aed4;hp=a6b993afe22c54851c16390612d5454a9202c9bf;hpb=1a79bdfd453f4ae8e07074a4cc6669672c7ca2f7;p=ric-plt%2Fe2.git diff --git a/RIC-E2-TERMINATION/base64.h b/RIC-E2-TERMINATION/base64.h index a6b993a..f2f7b6f 100644 --- a/RIC-E2-TERMINATION/base64.h +++ b/RIC-E2-TERMINATION/base64.h @@ -14,6 +14,11 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + + /* + * This source code is part of the near-RT RIC (RAN Intelligent Controller) + * platform project (RICP). + */ // // Created by adi ENZEL on 9/26/19. @@ -23,13 +28,35 @@ #define E2_BASE64_H #include +#include +#include static const unsigned char base64_table[65] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; +#define INVERSE_TABLE_SIZE 256 + class base64 { public: - static void encode(const unsigned char *src, const int srcLen, char unsigned *dst, int &dstLen); + /** + * + * @param src + * @param srcLen + * @param dst + * @param dstLen + * @return 0 = OK -1 fault + */ + static int encode(const unsigned char *src, int srcLen, char unsigned *dst, long &dstLen); + /** + * + * @param src + * @param srcLen + * @param dst + * @param dstLen + * @return 0 = OK -1 fault + */ + static int decode(const unsigned char *src, int srcLen, char unsigned *dst, long &dstLen); + };