java
sql
iphone
css
xml
python
xcode
ruby-on-rails
regex
mysql
visual-studio
multithreading
eclipse
html5
perl
algorithm
oracle
apache
api
dom
<cfset x1 = toString(tobase64(result))>
The other function is returning hex, not base64. Other than that it seems to work fine for me:
<cfset x1 = binaryEncode(result, "hex")>
The clue is in your expected output string: it contains only digits and lowercase letters. If you look closer, all the letters are in the range a-f. Therefore it is extremely likely that it is a hexadecimal string.
The last line of your example code encodes the result as base64, not hexadecimal. You can encode the result as hexadecimal by changing the last line to this:
<cfset x1 = binaryEncode(result,"hex")>
I ran the modified code and got
9E734661C9E8B6DC9B6B4B3DEF9769C00E8843B8
which is the uppercase version of your expected string.