X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=RIC-E2-TERMINATION%2Fbase64.h;h=f2f7b6f39865fd63adbb473d997162fcab1c4805;hb=77fff437e22b0ac00466a486705b8bc24f06224d;hp=61fdd630144916d785e5966b7e2f10547b4be411;hpb=5efc7facf9fd178ec56e6a89c091da729672397f;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); + };