File Coverage

blib/lib/SBOM/CycloneDX/Enum/HashAlgorithm.pm
Criterion Covered Total %
statement 20 20 100.0
branch n/a
condition n/a
subroutine 7 7 100.0
pod 0 1 0.0
total 27 28 96.4


line stmt bran cond sub pod time code
1             package SBOM::CycloneDX::Enum::HashAlgorithm;
2              
3 16     16   312 use 5.010001;
  16         66  
4 16     16   88 use strict;
  16         41  
  16         434  
5 16     16   76 use warnings;
  16         28  
  16         793  
6 16     16   120 use utf8;
  16         69  
  16         372  
7              
8 16     16   1220 use Exporter 'import';
  16         110  
  16         3822  
9             our (@EXPORT_OK, %EXPORT_TAGS, %ENUM);
10              
11             BEGIN {
12              
13 16     16   262 %ENUM = (
14             MD5 => 'MD5',
15             SHA_1 => 'SHA-1',
16             SHA_256 => 'SHA-256',
17             SHA_384 => 'SHA-384',
18             SHA_512 => 'SHA-512',
19             SHA3_256 => 'SHA3-256',
20             SHA3_384 => 'SHA3-384',
21             SHA3_512 => 'SHA3-512',
22             BLAKE2B_256 => 'BLAKE2b-256',
23             BLAKE2B_384 => 'BLAKE2b-384',
24             BLAKE2B_512 => 'BLAKE2b-512',
25             BLAKE3 => 'BLAKE3',
26             STREEBOG_256 => 'Streebog-256',
27             STREEBOG_512 => 'Streebog-512',
28             );
29              
30 16         233 require constant;
31 16         2263 constant->import(\%ENUM);
32              
33 16         353 @EXPORT_OK = sort keys %ENUM;
34 16         1708 %EXPORT_TAGS = (all => \@EXPORT_OK);
35              
36             }
37              
38 3     3 0 39 sub values { sort values %ENUM }
39              
40             1;
41              
42             =encoding utf-8
43              
44             =head1 NAME
45              
46             SBOM::CycloneDX::Enum::HashAlgorithm - Hash Algorithm
47              
48             =head1 SYNOPSIS
49              
50             use SBOM::CycloneDX::Enum qw(HASH_ALGORITHM);
51              
52             say HASH_ALGORITHM->SHA_512;
53              
54              
55             use SBOM::CycloneDX::Enum::HashAlgorithm;
56              
57             say SBOM::CycloneDX::Enum::HashAlgorithm->MD5;
58              
59              
60             use SBOM::CycloneDX::Enum::HashAlgorithm qw(:all);
61              
62             say SHA1;
63              
64              
65             =head1 DESCRIPTION
66              
67             L is ENUM package used by L.
68              
69             The algorithm that generated the hash value.
70              
71              
72             =head1 CONSTANTS
73              
74             =over
75              
76             =item * C
77              
78             =item * C
79              
80             =item * C
81              
82             =item * C
83              
84             =item * C
85              
86             =item * C
87              
88             =item * C
89              
90             =item * C
91              
92             =item * C
93              
94             =item * C
95              
96             =item * C
97              
98             =item * C
99              
100             =item * C
101              
102             =item * C
103              
104             =back
105              
106             =head1 SUPPORT
107              
108             =head2 Bugs / Feature Requests
109              
110             Please report any bugs or feature requests through the issue tracker
111             at L.
112             You will be notified automatically of any progress on your issue.
113              
114             =head2 Source Code
115              
116             This is open source software. The code repository is available for
117             public review and contribution under the terms of the license.
118              
119             L
120              
121             git clone https://github.com/giterlizzi/perl-SBOM-CycloneDX.git
122              
123              
124             =head1 AUTHOR
125              
126             =over 4
127              
128             =item * Giuseppe Di Terlizzi
129              
130             =back
131              
132              
133             =head1 LICENSE AND COPYRIGHT
134              
135             This software is copyright (c) 2025-2026 by Giuseppe Di Terlizzi.
136              
137             This is free software; you can redistribute it and/or modify it under
138             the same terms as the Perl 5 programming language system itself.
139              
140             =cut