Example usage of BCrypt

final String password = "suparSekrit";
final String salt = BCrypt.gensalt(10); //between 1 and 30. Each increment ~ 
doubles cpu load.
final String hash = BCrypt.hashpw(password, salt); //one way hash
boolean match = BCrypt.checkpw(password, hash); //match is true
boolean nomatch = BCrypt.checkpw("wrong password", hash); //nomatch is false

Ramsey

On Feb 5, 2013, at 8:13 AM, Jesse Tayler wrote:

> 
> Like. 
> 
> Wait - BCrypt not available from MessageDigest?
> 
>       NoSuchAlgorithmException: BCrypt MessageDigest not available
> 
> I seem to be using MessageDigest to crypt MD5 or SHA1 ok…
> 
> 
> On Feb 4, 2013, at 5:07 PM, Ramsey Gurley <rgur...@smarthealth.com> wrote:
> 
>> Specifically
>> 
>> er.extensions.crypting.BCrypt
>> 
>> You don't want a quick hash, you want a computationally expensive hash for 
>> handling login.
>> 
>> http://codahale.com/how-to-safely-store-a-password/
>> 
>> Ramsey
>> 
>> On Feb 4, 2013, at 12:34 PM, Tim Worman wrote:
>> 
>>> er.extensions.crypting
>>> 
>>> Tim
>>> UCLA GSE&IS
>>> 
>>> On Feb 4, 2013, at 11:29 AM, Jesse Tayler <jtay...@oeinc.com> wrote:
>>> 
>>>> 
>>>> doesn't Wonder have a quick hash (sha1 maybe?) for handling user login?
>>>> 
>>>> can't seem to spot it--
>>>> 
>>>> 
>>>> _______________________________________________
>>>> Do not post admin requests to the list. They will be ignored.
>>>> Webobjects-dev mailing list      (Webobjects-dev@lists.apple.com)
>>>> Help/Unsubscribe/Update your Subscription:
>>>> https://lists.apple.com/mailman/options/webobjects-dev/lists%40thetimmy.com
>>>> 
>>>> This email sent to li...@thetimmy.com
>>> 
>>> _______________________________________________
>>> Do not post admin requests to the list. They will be ignored.
>>> Webobjects-dev mailing list      (Webobjects-dev@lists.apple.com)
>>> Help/Unsubscribe/Update your Subscription:
>>> https://lists.apple.com/mailman/options/webobjects-dev/rgurley%40smarthealth.com
>>> 
>>> This email sent to rgur...@smarthealth.com
>> 
> 
> 
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Webobjects-dev mailing list      (Webobjects-dev@lists.apple.com)
> Help/Unsubscribe/Update your Subscription:
> https://lists.apple.com/mailman/options/webobjects-dev/ramseygurley%40gmail.com
> 
> This email sent to ramseygur...@gmail.com


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to