摘要
:base6 4是Internet中传送二进制数据常用的MIME编码类型。它的基本原理是将每个连续的三个字节 ( 2 4位 )数据组合表示为四个六位数值 ,再把每六位数值当作一个NVTASCII字符来传输。通常情况下 ,这种编码程序都是用C/C + +的位操作运算实现的 ,而VisualBasic中没有提供针对字节的位运算符。本文通过数学方法得到了移位和字节重组的替代形式 ,从而用VisualBasic6 .0实现了base6 4编码 /解码。
Base64 is a common coding type used in conveying binary data on Internet. The basic principle of it is to divide every three continuous byte (24bit) into four six-bit values, and then convey each six-bit value as a NVT ASCII character. This encoding program is obtained by C/ C++ bit operation under normal conditions. But Visual Basic doesn′t provide bit operator in connection with type. In this paper, we get a substitute method of bit movement and bit recomposition through mathematic method, thus obtain base64 encoding/decoding in Visual Basic6.0.
出处
《计算机应用》
CSCD
2000年第9期28-30,共3页
journal of Computer Applications