Chilkat
HOME
Android™
ASP
Visual Basic
VB.NET
C#
iOS (IPhone)
Objective-C
C++
C
MFC
Delphi
FoxPro
Java
Perl
PHP Extension
PHP ActiveX
Python
PowerShell
Ruby
SQL Server
VBScript
|
|
Convert Binary Bytes to a Quoted-Printable String
ASP Script to convert from a binary byte array into a quoted-printable string. <html>
<body>
<%
set crypt = Server.CreateObject("Chilkat.Crypt2")
crypt.UnlockComponent "anything"
crypt.CryptAlgorithm = "none"
' Encode the output in a quoted-printable string.
crypt.EncodingMode = "quoted-printable"
' Create a byte array containing 61 bytes.
dim bData(60)
for i = 15 to 75
bData(i-15) = CByte(i)
next
' The output in this case looks like:
' =0F=10=11=12=13=14=15=16=17=18=19=1A=1B=1C=1D=1E=1F !"#$%&'()*+,-./01234= 56789:;<=3D>?@ABCDEFGHIJK
' EncryptBytesENC accepts a binary byte array and returns a quoted-printable string.
qpEncoded = crypt.EncryptBytesENC(bData)
Response.Write "<p>" + qpEncoded + "</p>"
%>
</body>
</html>
|
© 2000-2012 Chilkat Software, Inc. All Rights Reserved.