File Coverage

blib/lib/Net/SAML2/Util.pm
Criterion Covered Total %
statement 13 13 100.0
branch n/a
condition n/a
subroutine 5 5 100.0
pod 1 1 100.0
total 19 19 100.0


line stmt bran cond sub pod time code
1             package Net::SAML2::Util;
2              
3 13     13   119 use strict;
  13         33  
  13         508  
4 13     13   76 use warnings;
  13         34  
  13         703  
5              
6             our $VERSION = '0.42';
7              
8 13     13   6701 use Crypt::OpenSSL::Random qw(random_pseudo_bytes);
  13         8589  
  13         1046  
9              
10             # ABSTRACT: Utility functions for Net:SAML2
11              
12 13     13   107 use Exporter qw(import);
  13         35  
  13         1167  
13              
14             our @EXPORT_OK = qw(
15             generate_id
16             );
17              
18             sub generate_id {
19 13     13 1 3235 return 'NETSAML2_' . unpack 'H*', random_pseudo_bytes(16);
20             }
21              
22              
23             1;
24              
25             __END__
26              
27             =pod
28              
29             =encoding UTF-8
30              
31             =head1 NAME
32              
33             Net::SAML2::Util - Utility functions for Net:SAML2
34              
35             =head1 VERSION
36              
37             version 0.42
38              
39             =head1 SYNOPSIS
40              
41             use Net::SAML2::Util qw(generate_id);
42              
43             =head1 DESCRIPTION
44              
45             =head1 METHODS
46              
47             =head2 sub generate_id {}
48              
49             Generate a NETSAML2 Request Id
50              
51             =head1 AUTHOR
52              
53             Chris Andrews <chrisa@cpan.org>
54              
55             =head1 COPYRIGHT AND LICENSE
56              
57             This software is copyright (c) 2021 by Chris Andrews and Others, see the git log.
58              
59             This is free software; you can redistribute it and/or modify it under
60             the same terms as the Perl 5 programming language system itself.
61              
62             =cut