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
|
|
Ascii To Hex Conversion
Demonstrates how to convert a string to a hex string where each 2-character hex digit represents a character. For example "65" represents "A". <html>
<body>
<%
set crypt = Server.CreateObject("Chilkat.Crypt2")
crypt.UnlockComponent "anything"
crypt.CryptAlgorithm = "none"
' Encode the output in a hexidecimal string.
crypt.EncodingMode = "hex"
crypt.Charset = "iso-8859-1"
' The string ABCDEF is Unicode. The obj.Charset property tells the component
' to (internally) convert each Unicode character to a single-byte iso-8859-1 character.
' iso-8859-1 is identical to us-ascii, but it also includes Western European accented characters.
hexStr = crypt.EncryptStringEnc("ABCDEF")
Response.Write "<p>" + hexStr + "</p>"
%>
</body>
</html>
|
© 2000-2012 Chilkat Software, Inc. All Rights Reserved.