Defines | Functions | Variables

ink_base64.cc File Reference

A brief file description. More...

#include "libts.h"
#include "ink_assert.h"
Include dependency graph for ink_base64.cc:

Go to the source code of this file.

Defines

#define DECODE(x)   printableToSixBit[(unsigned char)x]
#define MAX_PRINT_VAL   63

Functions

bool ats_base64_encode (const unsigned char *inBuffer, size_t inBufferSize, char *outBuffer, size_t outBufSize, size_t *length)
bool ats_base64_encode (const char *inBuffer, size_t inBufferSize, char *outBuffer, size_t outBufSize, size_t *length)
bool ats_base64_decode (const char *inBuffer, size_t inBufferSize, unsigned char *outBuffer, size_t outBufSize, size_t *length)

Variables

const unsigned char printableToSixBit [256]

Detailed Description

A brief file description.

License

Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Definition in file ink_base64.cc.


Define Documentation

#define DECODE (   x  )     printableToSixBit[(unsigned char)x]

Definition at line 106 of file ink_base64.cc.

Referenced by ats_base64_decode().

#define MAX_PRINT_VAL   63

Definition at line 107 of file ink_base64.cc.

Referenced by ats_base64_decode().


Function Documentation

bool ats_base64_decode ( const char *  inBuffer,
size_t  inBufferSize,
unsigned char *  outBuffer,
size_t  outBufSize,
size_t *  length 
)

Definition at line 125 of file ink_base64.cc.

References ATS_BASE64_DECODE_DSTLEN, DECODE, MAX_PRINT_VAL, and printableToSixBit.

Referenced by TSBase64Decode().

bool ats_base64_encode ( const unsigned char *  inBuffer,
size_t  inBufferSize,
char *  outBuffer,
size_t  outBufSize,
size_t *  length 
)

Definition at line 40 of file ink_base64.cc.

References ATS_BASE64_ENCODE_DSTLEN, and memcpy.

Referenced by ats_base64_encode(), and TSBase64Encode().

bool ats_base64_encode ( const char *  inBuffer,
size_t  inBufferSize,
char *  outBuffer,
size_t  outBufSize,
size_t *  length 
)

Definition at line 93 of file ink_base64.cc.

References ats_base64_encode().


Variable Documentation

const unsigned char printableToSixBit[256]
Initial value:
 {
  64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,
  64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 62, 64, 62, 64, 63,
  52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 64, 64, 64, 64, 64, 64, 64, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,
  10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 64, 64, 64, 64, 63, 64, 26, 27,
  28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51,
  64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,
  64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,
  64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,
  64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,
  64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,
  64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64
}

Definition at line 110 of file ink_base64.cc.

Referenced by ats_base64_decode().