节点文献
在VB6.0中实现base64编码/解码
BASE64 ENCODING/DECODING IN VB6.0
【摘要】 :base6 4是Internet中传送二进制数据常用的MIME编码类型。它的基本原理是将每个连续的三个字节 ( 2 4位 )数据组合表示为四个六位数值 ,再把每六位数值当作一个NVTASCII字符来传输。通常情况下 ,这种编码程序都是用C/C + +的位操作运算实现的 ,而VisualBasic中没有提供针对字节的位运算符。本文通过数学方法得到了移位和字节重组的替代形式 ,从而用VisualBasic6 .0实现了base6 4编码 /解码。
【Abstract】 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.
【Key words】 base64; Visual Basic; MIME; bit operation; bit movemont; encoding; decoding; byte;
- 【文献出处】 计算机应用 ,COMPUTER APPLICATIONS , 编辑部邮箱 ,2000年09期
- 【分类号】TP311
- 【被引频次】12
- 【下载频次】133