X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=RIC-E2-TERMINATION%2Fbase64.h;h=f2f7b6f39865fd63adbb473d997162fcab1c4805;hb=3bac2da3306cb753f967ce41dad1e7719380c916;hp=61fdd630144916d785e5966b7e2f10547b4be411;hpb=2e26814afae07ee5b75b5403c1cb84f1de1e3ef4;p=ric-plt%2Fe2.git diff --git a/RIC-E2-TERMINATION/base64.h b/RIC-E2-TERMINATION/base64.h index 61fdd63..f2f7b6f 100644 --- a/RIC-E2-TERMINATION/base64.h +++ b/RIC-E2-TERMINATION/base64.h @@ -14,13 +14,12 @@ * 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. // @@ -29,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); + };