Lines Matching defs:SHA

1 package Digest::SHA;
254 XSLoader::load('Digest::SHA', $VERSION);
259 Digest::SHA->bootstrap($VERSION);
267 Digest::SHA - Perl extension for SHA-1/224/256/384/512
275 use Digest::SHA qw(sha1 sha1_hex sha1_base64 ...);
287 use Digest::SHA;
289 $sha = Digest::SHA->new($alg);
313 =head1 SYNOPSIS (HMAC-SHA)
317 use Digest::SHA qw(hmac_sha1 hmac_sha1_hex ...);
325 Digest::SHA is a complete implementation of the NIST Secure Hash Standard.
326 It gives Perl programmers a convenient way to calculate SHA-1, SHA-224,
327 SHA-256, SHA-384, SHA-512, SHA-512/224, and SHA-512/256 message digests.
332 Digest::SHA is written in C for speed. If your platform lacks a
334 slower) L<Digest::SHA::PurePerl> module.
338 use L<Digest::MD5> and you'd prefer the stronger security of SHA,
343 the SHA-256 digest of "hello world" using each approach:
345 use Digest::SHA qw(sha256_hex);
354 $state = Digest::SHA->new(256);
364 148 times, followed by "11". Here's how to display its SHA-1
367 use Digest::SHA;
369 $sha = Digest::SHA->new(1)->add_bits($bits);
376 The module also lets you save intermediate SHA states to a string. The
383 use Digest::SHA;
384 print Digest::SHA->new->add("Shaw" x 1962)->getstate;
386 As an added convenience, the Digest::SHA module offers routines to
387 calculate keyed hashes using the HMAC-SHA-1/224/256/384/512
394 use Digest::SHA qw(hmac_sha256_hex);
402 as SHA that are specified to operate on sequences of bytes.
404 The rule by which Digest::SHA handles a Unicode string is easy
411 Since a wide character does not fit into a byte, the Digest::SHA
427 =head1 NIST STATEMENT ON SHA-1
430 practical collision attack on SHA-1. Therefore, NIST encourages the
431 rapid adoption of the SHA-2 hash functions (e.g. SHA-256) for applications
468 to perform the SHA-384 and SHA-512 transforms, both of which require
490 its SHA-1/224/256/384/512 digest encoded as a binary string.
507 its SHA-1/224/256/384/512 digest encoded as a hexadecimal string.
524 its SHA-1/224/256/384/512 digest encoded as a Base64 string.
539 Returns a new Digest::SHA object. Allowed values for I<$alg> are 1,
542 "SHA-384"). If the argument is missing, SHA-1 will be used by
558 160, 224, 256, 384, 512, 224, and 256 for SHA-1, SHA-224, SHA-256,
559 SHA-384, SHA-512, SHA-512/224 and SHA-512/256, respectively.
564 224, 256, 384, 512, 512224, and 512256 for SHA-1, SHA-224, SHA-256,
565 SHA-384, SHA-512, SHA-512/224, and SHA-512/256, respectively.
605 Note that SHA-1 and SHA-2 use I<most-significant-bit ordering>
651 of the current SHA state.
655 Returns a Digest::SHA object representing the SHA state contained
669 Returns a Digest::SHA object that results from calling I<putstate> on
678 has been performed, the Digest::SHA object is automatically reset
706 I<HMAC-SHA-1/224/256/384/512>
724 Returns the HMAC-SHA-1/224/256/384/512 digest of I<$data>/I<$key>,
743 Returns the HMAC-SHA-1/224/256/384/512 digest of I<$data>/I<$key>,
762 Returns the HMAC-SHA-1/224/256/384/512 digest of I<$data>/I<$key>,
776 L<Digest>, L<Digest::SHA::PurePerl>