views:

602

answers:

2

Hi! can anyone recommend a good method to create a sha1 salt using javascript ?

A: 

Check out this jQuery Plugin: http://plugins.jquery.com/project/sha1

rochal
i want to create a salt that contains random numbers, characters and length to use when encoding other strings. this plugin encodes string to sha1. how can i use it to my advantage ? just to encode several random numbers together and cat the length random ?
ufk
+3  A: 

First, read up on what a salt is for to make sure you understand it. This and this will get you started, but you should read more.

Essentially, any random data of appropriate size will work for your purpose. Generally speaking, the fact that you are using SHA1 is irrelevant.

Just make sure it is large enough to prevent realistic rainbow table attacks.

Dan McGrath