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


gsk_decode_base64()

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

Decodes a Base64-encoded stream.

Format

   #include <gskcms.h>

   gsk_status gsk_decode_base64 (  
                                  gsk_buffer *     encoded_stream, 
                                  gsk_buffer *     decoded_stream)

Parameters

encoded_stream
Specifies the Base64-encoded stream. The encoded data must be in the local code page.
decoded_stream
Returns the decoded stream. The application should call the gsk_free_buffer() routine to release the decoded 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. These are some possible errors:
[CMSERR_BAD_BASE64_ENCODING]
Incorrect Base64 encoding.
[CMSERR_NO_MEMORY]
Insufficient storage is available.

Usage

The gsk_decode_base64() routine will decode a Base64-encoded stream created by the gsk_encode_base64() routine. The encoded stream must be in the local code page and must not include any header or trailer lines added by the application to identify the stream contents (such as '-----BEGIN CERTIFICATE-----' or '-----END CERTIFICATE-----'). New line characters and whitespace characters (tabs and spaces) are ignored.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014