What is Argon2?

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.

Free Resources