Trusted answers to developer questions

What is Argon2?

Get Started With Machine Learning

Learn the fundamentals of Machine Learning with this free course. Future-proof your career by adding ML skills to your toolkit — or prepare to land a job in AI or Data Science.

Overview

Argon2 is an extraordinary choice to hash passwords because its work figure is movable, meaning that the time it takes to create a hash can be expanded as equipment control increments increase.

When hashing passwords, a moderate password is better. The longer a calculation takes to hash a password, the longer it takes malevolent clients to create “rainbow tables” of all possible string hash values utilized in brute drive assaults against applications.


Hashing is simply passing some data through a formula that produces a result, called a hash.

Code


$hashed = Hash::make('password', [
    'memory' => 1024,
    'time' => 2,
    'threads' => 2,
]);

Explanation

The code above is used to customize the work factor of Argon2. Please refer to the Basics of Hashing as this shot expands on this topic further.

RELATED TAGS

php
argon2

CONTRIBUTOR

Chinweuba Elijah Azubuike
Did you find this helpful?