therefore
https://metacpan.org/pod/Text::CSV::Hashify
# Simple functional interface
use
Text::CSV::Hashify;
$hash_ref
= hashify(
'/path/to/file.csv'
,
'primary_key'
);
# Object-oriented interface
use
Text::CSV::Hashify;
$obj
= Text::CSV::Hashify->new( {
file
=>
'/path/to/file.csv'
,
format
=>
'hoh'
,
# hash of hashes, which is default
key
=>
'id'
,
# needed except when format is 'aoh'
max_rows
=> 20,
# number of records to read; defaults to all
...
# other key-value pairs as appropriate from Text::CSV
} );
# all records requested
$hash_ref
=
$obj
->all;
# arrayref of fields input
$fields_ref
=
$obj
->fields;
# hashref of specified record
$record_ref
=
$obj
->record(
'value_of_key'
);
# value of one field in one record
$datum
=
$obj
->datum(
'value_of_key'
,
'field'
);
# arrayref of all unique keys seen
$keys_ref
=
$obj
->
keys
;
this
"...The salt is generally stored in the database right next to the hash. In fact, it needs to be. How else could the web server hash the incoming passwords when checking them? So if you have a database dump, you have the salts.
You can often tell by the format or the length of the hash. For instance, a bcrypt hash usually begins with the marker $2b$
what's salt?
No comments:
Post a Comment