当前位置: 网学 > 编程文档 > VB > 正文

用VB实现一个简单的ESMTP客户端

来源:Http://myeducs.cn 联系QQ:点击这里给我发消息 作者: 用户投稿 来源: 网络 发布时间: 12/10/16
下载{$ArticleTitle}原创论文样式
bsp;           out = out + "=="
            base64encode = out
            Exit Function
        End If
        c2 = Asc(Mid(str, i + 1, 1))
        i = i + 1
        If (i = len1) Then
            out = out + Mid(base64EncodeChars, c1 \ 4 + 1, 1)
            out = out + Mid(base64EncodeChars, (((c1 And 3) * 16) Or ((c2 And 240) \ 16)) + 1, 1)
            out = out + Mid(base64EncodeChars, (c2 And 15) * 4 + 1, 1)
            out = out + "="
            base64encode = out
            Exit Function
        End If
        c3 = Asc(Mid(str, i + 1, 1))
        i = i + 1
        out = out + Mid(base64EncodeChars, c1 \ 4 + 1, 1)
        out = out + Mid(base64EncodeChars, (((c1 And 3) * 16) Or ((c2 And 240) \ 16)) + 1, 1)
        out = out + Mid(base64EncodeChars, (((c2 And 15) * 4) Or ((c3 And 192) \ 64)) + 1, 1)
        out = out + Mid(base64EncodeChars, (c3 And 63) + 1, 1)
    Wend

    base64encode = out
End Function

Function base64decode(str As String) As String

    For i = 0 To 127
        base64DecodeChars(i) = -1
    Next
    base64DecodeChars(43) = 62
    base64DecodeChars(47) = 63

    For i = 48 To 57
        base64DecodeChars(i) = i + 4
    Next

    For i = 65 To 90
        base64DecodeChars(i) = i - 65
    Next

    For i = 97 To 122
        base64DecodeChars(i) = i - 71
    Next

    Dim c1, c2, c3, c4
    Dim len1, out

    len1 = Len(str)
    i = 0
    out = ""
    
    While (i < len1)
   
        Do
  &nbs
  • 下一篇资讯: VB与数据连接的心得
  • 网学推荐

    免费论文

    原创论文

    浏览:
    设为首页 | 加入收藏 | 论文首页 | 论文专题 | 设计下载 | 网学软件 | 论文模板 | 论文资源 | 程序设计 | 关于网学 | 站内搜索 | 网学留言 | 友情链接 | 资料中心
    版权所有 QQ:3710167 邮箱:3710167@qq.com 网学网 [Myeducs.cn] 您电脑的分辨率是 像素
    Copyright 2008-2015 myeducs.Cn www.myeducs.Cn All Rights Reserved
    湘ICP备09003080号