CycloneDX/Enum/HashAlgorithm.pm

filter: Statementstmt 100% 22 / 22 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 7 / 7 Podpod 0.0% 0 / 1 totaltotal 96.6% 29 / 30 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« CycloneDX/Enum/ExternalReferenceType.pm ↑ Summary CycloneDX/Enum/ImpactAnalysisJustification.pm »
1 package SBOM::CycloneDX::Enum::HashAlgorithm;
2  
3 16 ▶use 5.010001;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 16 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 16 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 16 ▶use utf8;
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 16 ▶use Exporter 'import';
Subroutine BEGIN: called CC=1 SCAR=0.0
9 16 our (@EXPORT_OK, %EXPORT_TAGS, %ENUM);
10  
11 16 ▶BEGIN {
Subroutine BEGIN: called CC=1 SCAR=0.0
12  
13 16 %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 require constant;
31 16 constant->import(\%ENUM);
32  
33 16 @EXPORT_OK = sort keys %ENUM;
34 16 %EXPORT_TAGS = (all => \@EXPORT_OK);
35  
36 }
37  
38 3 ▶sub values { sort values %ENUM }
Subroutine values: called CC=1 SCAR=0.0
Pod undocumented
39  
40 16 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<SBOM::CycloneDX::Enum::HashAlgorithm> is ENUM package used by L<SBOM::CycloneDX>.
68  
69 The algorithm that generated the hash value.
70  
71  
72 =head1 CONSTANTS
73  
74 =over
75  
76 =item * C<MD5>
77  
78 =item * C<SHA_1>
79  
80 =item * C<SHA_256>
81  
82 =item * C<SHA_384>
83  
84 =item * C<SHA_512>
85  
86 =item * C<SHA3_256>
87  
88 =item * C<SHA3_384>
89  
90 =item * C<SHA3_512>
91  
92 =item * C<BLAKE2B_256>
93  
94 =item * C<BLAKE2B_384>
95  
96 =item * C<BLAKE2B_512>
97  
98 =item * C<BLAKE3>
99  
100 =item * C<STREEBOG_256>
101  
102 =item * C<STREEBOG_512>
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<https://github.com/giterlizzi/perl-SBOM-CycloneDX/issues>.
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<https://github.com/giterlizzi/perl-SBOM-CycloneDX>
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 <gdt@cpan.org>
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
« CycloneDX/Enum/ExternalReferenceType.pm ↑ Summary CycloneDX/Enum/ImpactAnalysisJustification.pm »