close ad
WARNING: Do Not Install the DREAMWEAVER CC 2017 Update »
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

SALT & CRYPT

Thread began 7/11/2013 5:45 am by Col Foster | Last modified 7/12/2013 4:48 pm by Col Foster | 846 views | 10 replies |

Col Foster

SALT & CRYPT

Hi,
I've created security assist pages & encrypted the pwd & email address using CRYPT.
I've also added a salt string to the wa_securitykey.php file but can only see the 13 character CRYPT string in my database.
Is there another step I need to take to add SALT?

Thanks

Sign in to reply to this post

Jason ByrnesWebAssist

crypt is capable of generating an encrypted string using multiple encryption methods as long as they are supported bu the server.

the encryption method used depends on the format of the salt string.

see this page for details:
http://php.net/manual/en/function.crypt.php

Sign in to reply to this post

Col Foster

Understood Jason,
but I thought that by modifying wa_securitykey.php, my SALT string would be added to the end of the 13 character string in the database generated by CRYPT.

Sign in to reply to this post

Jason ByrnesWebAssist

the salt string gets added to the beginning of the the string that gets stored in the database, but the salt string must conform to one of the recognized formats.

again, see the crypt manual page for more information:
http://php.net/manual/en/function.crypt.php

Sign in to reply to this post

Col Foster

Thanks Jason PM sent

Sign in to reply to this post

Jason ByrnesWebAssist

Originally Said By: Col Foster
  Thanks Jason PM sent  
Sign in to reply to this post

Col Foster

"Probably the most secure would using crypt with a salt string for the SHA512 algorithm."

Would choosing "Crypt" from the options acheive this?

Sign in to reply to this post

Jason ByrnesWebAssist

Yes.

have you read the crypt manual page that i have linked to?

crypt is capable of using different algorithms. one of the algorithms it can use is SHA512 if the SHA512 library is installed on the server.

the algorithm that will be used by the crypt library depends on the format of the salt string.

if you visit the crypt manual page that i linked to, it gives the example salt string of:
$6$rounds=5000$usesomesillystringforsalt$

in the example is encrypts the sting:
rasmuslerdorf

using the above salt as:
$6$rounds=5000$usesomesillystri$D4IrlXatmP7rx3P3InaxBeoomnAihCKRVQP22JZ6EY47Wc6BkroIuUUBOov1i.S5KPgErtP/EN5mcO.ChWQW21

Sign in to reply to this post

Col Foster

I've tried using the example $6$rounds=5000$usesomesillystringforsalt$ verbatim and it returns an undefined variable error.

I also tried it without the 4 "$". I was able to register but the string in the database was still the standard (for crypt) 13 characters.

Sign in to reply to this post

Jason ByrnesWebAssist

escape the $ character with a forward slash:

\$

Sign in to reply to this post
loading

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...