This class can be used to generate a grid of tokens to authenticate users similar to those that banks provided to users to avoid account abuses after phishing attacks.
It generates a bidimensional array of tokens of limited length with letters and digits.
The generated grid is seeded by a given secret salt string and a specific id that may be used to generate unique grids for different applications and users.
The class may also verify whether a token entered by the user corresponds to a token of a random grid position.
$token_grid = new TokenGrid(10, 10, 4, "MySalt");