@@ -510,13 +510,22 @@ Perl has been built with. Possible sizes may be but are not limited to
510
510
=item B<hash_value >
511
511
512
512
my $hash_value = hash_value($string);
513
-
514
- hash_value() returns the current perl's internal hash value for a given
515
- string.
516
-
517
- Returns a 32 bit integer representing the hash value of the string passed
518
- in. This value is only reliable for the lifetime of the process. It may
519
- be different depending on invocation, environment variables, perl version,
513
+ my $hash_value = hash_value($string, $seed);
514
+
515
+ C<hash_value($string) >
516
+ returns
517
+ the current perl's internal hash value for a given string.
518
+ C<hash_value($string, $seed) >
519
+ returns the hash value as if computed with a different seed.
520
+ If the custom seed is too short, the function errors out.
521
+ The minimum length of the seed is implementation-dependent.
522
+
523
+ Returns a 32-bit integer
524
+ representing the hash value of the string passed in.
525
+ The 1-parameter value is only reliable
526
+ for the lifetime of the process.
527
+ It may be different
528
+ depending on invocation, environment variables, perl version,
520
529
architectures, and build options.
521
530
522
531
B<Note that the hash value of a given string is sensitive information > :
@@ -833,6 +842,9 @@ hv_store() is from Array::RefElem, Copyright 2000 Gisle Aas.
833
842
834
843
Additional code by Yves Orton.
835
844
845
+ Description of C<hash_value($string, $seed) >
846
+ by Christopher Yeleighton <[email protected] >
847
+
836
848
=head1 SEE ALSO
837
849
838
850
L<Scalar::Util> , L<List::Util> and L<perlsec/"Algorithmic Complexity Attacks"> .
0 commit comments