buffer_base64_encode

语法:

buffer_base64_encode(buffer, offset, size);


参数 描述
buffer The index of the buffer to use.
偏移 The data offset value.
大小 The size of the buffer.


返回: String(字符串)


描述

This function will convert the data from the given buffer into a base64 format encoded string. 这是一种常用的编码方案,通常用于需要通过互联网作为文本存储或传输的媒体,并使输出对人眼不可读。To use this you need to specify an already created buffer, the offset value (which is the point within the buffer at which you wish to start encoding) as well as the size, in bytes, of the buffer memory to encode.


例如:

var b_str = buffer_base64_encode(buff, 0, buffer_get_size(buff))

The above code will create encode the full data stored in the buffer indexed by the variable "buff", and store the returned string in the local variable "b_str".