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
|
|
Binary to Base64 Encoding
ASP Script to convert from binary to Base64 encoding. This sample code creates a binary byte array and encodes it to a base-64 string. <html>
<body>
<%
set crypt = Server.CreateObject("Chilkat.Crypt2")
crypt.UnlockComponent "anything"
crypt.CryptAlgorithm = "none"
' Encode the output in a base64 string.
crypt.EncodingMode = "base64"
' Create a byte array containing 20 bytes.
dim bData(19)
for i = 0 to 19
bData(i) = CByte(i)
next
' EncryptBytesENC accepts a binary byte array and returns an base-64 encoded string.
base64 = crypt.EncryptBytesENC(bData)
Response.Write "<p>" + base64 + "</p>"
%>
</body>
</html>
|
© 2000-2012 Chilkat Software, Inc. All Rights Reserved.