Flicks FAQ: Encodeviadll

Back to the top of the FAQ


The EncodeViaDLL method calls the dll which you have supplied to encrypt/encode passwords in the external ODBC database. Use this method via ASP pages to encode a password before entering it into your own ODBC database password field. You do not need this if you are entering a password into the internal database.


EncodeViaDLL(compliantDLLPath, stringToEncode, encodedString)


The full pathname of the compliant dll.
The password you wish to translate.
The resulting encoded string

Return Values

Returns 0 for success. -11 if the encoded string is not of string type (set it to ""). -199 if the library could not be found (check the application event log). -198 if the translation function AXEncrypt could not be found in the dll. -197,-196 if there was a problem encrypting the string.


If you decide that you want to encode/encrypt passwords in your ODBC database, then you need to supply a dll for AuthentiX to encode/encrypt the password the user supplies, then to compare it with the encoded/encrypted password value in the database. You turn this on in the Options/Passwords "Encrypt passwords and compare against ODBC" checkbox.

If you then wanted to add users to the ODBC database via ASP, then this dll has to be called via an OCX method, and EncodeViaDLL is there to help you do this.

There is no need to decode this string, in fact if you encrypted it you would never be able to. From ASP you can get the username the user types in using CurrentUserName You can get the password the user types in using Base64Password as noted in the docs for currentusername

There is a base64 dll supplied which you can use, or you can create your own dll if your encryption needs are stronger.


The following encodes a password with the supplied base64 module.

usingAuthentiXStandard = true
usingAuthentiXStandard = true
if (usingAuthentiXStandard) then
Set AuthX = Server.CreateObject("AUTHXOCX.AuthXOCXCtrl.1") 
Set AuthX = Server.CreateObject("AUTHXISP.AuthXOCXCtrl.1") 
protectedDomain = Request.ServerVariables("LOCAL_ADDR")
'protectedDomain = "hostheader.com"
AuthX.SetVirtualDomain protectedDomain, Request.ServerVariables("SCRIPT_NAME")
end if

encodedPassword = ""
result = AuthX.EncodeViaDLL("c:\flicks\authentix\base64.dll", "passwordNumber1", encodedPassword)

if 0 = result Then
Encoded password is <%= encodedPassword %>
<% Else %>
Error: <%= result %>
<% End If %>


Applies To

AuthentiX OCX Component


Back to the top of the FAQ