z/OS Cryptographic Services System SSL Programming
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


gsk_encode_base64()

z/OS Cryptographic Services System SSL Programming
SC14-7495-00

Encodes binary data using Base64 encoding.

Format

   #include <gskcms.h>

   gsk_status gsk_encode_base64 ( 
                                  gsk_buffer *         input_data,
                                  gsk_buffer *         encoded_data)

Parameters

input_data
Specifies the data to be encoded.
encoded_data
Returns the encoded stream in the local code page. The application should call the gsk_free_buffer() routine to release the encoded stream when it is no longer needed.

Results

The function return value will be 0 if no error is detected. Otherwise, it will be one of the return codes listed in the gskcms.h include file. This is a possible error:
[CMSERR_NO_MEMORY]
Insufficient storage is available.

Usage

The gsk_encode_base64() routine will encode binary data using Base64 encoding. The encoded stream will consist of printable characters in the local code page. A new line will be inserted after each group of 64 encoded characters with a final new line at the end of the encoded stream. The gsk_decode_base64() routine can be used to decode the data.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014