File Coverage

blib/lib/SBOM/CycloneDX/CryptoProperties/Ikev2TransformType.pm
Criterion Covered Total %
statement 26 41 63.4
branch 0 12 0.0
condition n/a
subroutine 9 10 90.0
pod 1 1 100.0
total 36 64 56.2


line stmt bran cond sub pod time code
1             package SBOM::CycloneDX::CryptoProperties::Ikev2TransformType;
2              
3 1     1   3683 use 5.010001;
  1         7  
4 1     1   6 use strict;
  1         3  
  1         25  
5 1     1   5 use warnings;
  1         2  
  1         57  
6 1     1   6 use utf8;
  1         3  
  1         8  
7              
8 1     1   45 use SBOM::CycloneDX::List;
  1         2  
  1         43  
9              
10 1     1   5 use Types::Standard qw(Str);
  1         2  
  1         18  
11 1     1   3936 use Types::TypeTiny qw(ArrayLike);
  1         3  
  1         9  
12              
13 1     1   912 use Moo;
  1         3  
  1         89  
14 1     1   1181 use namespace::autoclean;
  1         2  
  1         13  
15              
16             extends 'SBOM::CycloneDX::Base';
17              
18             # bom-ref like
19             has encr => (is => 'rw', isa => ArrayLike [Str], default => sub { SBOM::CycloneDX::List->new });
20              
21             # bom-ref like
22             has prf => (is => 'rw', isa => ArrayLike [Str], default => sub { SBOM::CycloneDX::List->new });
23              
24             # bom-ref like
25             has integ => (is => 'rw', isa => ArrayLike [Str], default => sub { SBOM::CycloneDX::List->new });
26              
27             # bom-ref like
28             has ke => (is => 'rw', isa => ArrayLike [Str], default => sub { SBOM::CycloneDX::List->new });
29              
30             # bom-ref like
31             has esn => (is => 'rw', isa => ArrayLike [Str], default => sub { SBOM::CycloneDX::List->new });
32              
33             # bom-ref like
34             has auth => (is => 'rw', isa => ArrayLike [Str], default => sub { SBOM::CycloneDX::List->new });
35              
36              
37             sub TO_JSON {
38              
39 0     0 1   my $self = shift;
40              
41 0           my $json = {};
42              
43 0 0         $json->{encr} = $self->encr if @{$self->encr};
  0            
44 0 0         $json->{prf} = $self->prf if @{$self->prf};
  0            
45 0 0         $json->{integ} = $self->integ if @{$self->integ};
  0            
46 0 0         $json->{ke} = $self->ke if @{$self->ke};
  0            
47 0 0         $json->{esn} = $self->esn if @{$self->esn};
  0            
48 0 0         $json->{auth} = $self->auth if @{$self->auth};
  0            
49              
50 0           return $json;
51              
52             }
53              
54             1;
55              
56             =encoding utf-8
57              
58             =head1 NAME
59              
60             SBOM::CycloneDX::CryptoProperties::Ikev2TransformType - IKEv2 Transform Types
61              
62             =head1 SYNOPSIS
63              
64             SBOM::CycloneDX::CryptoProperties::Ikev2TransformType->new();
65              
66              
67             =head1 DESCRIPTION
68              
69             L specifies the IKEv2
70             transform types supported (types 1-4), defined in RFC 7296 section 3.3.2
71             (L), and additional properties.
72              
73             =head2 METHODS
74              
75             L inherits all methods from L
76             and implements the following new ones.
77              
78             =over
79              
80             =item SBOM::CycloneDX::CryptoProperties::Ikev2TransformType->new( %PARAMS )
81              
82             Properties:
83              
84             =over
85              
86             =item * C, IKEv2 Authentication method
87              
88             =item * C, Transform Type 1: encryption algorithms
89              
90             =item * C, Specifies if an Extended Sequence Number (ESN) is used.
91              
92             =item * C, Transform Type 3: integrity algorithms
93              
94             =item * C, Transform Type 4: Key Exchange Method (KE) per RFC
95             9370 (L), formerly called
96             Diffie-Hellman Group (D-H).
97              
98             =item * C, Transform Type 2: pseudorandom functions
99              
100             =back
101              
102             =item $ikev2_transform_type->auth
103              
104             =item $ikev2_transform_type->encr
105              
106             =item $ikev2_transform_type->esn
107              
108             =item $ikev2_transform_type->integ
109              
110             =item $ikev2_transform_type->ke
111              
112             =item $ikev2_transform_type->prf
113              
114             =back
115              
116              
117              
118             =head1 SUPPORT
119              
120             =head2 Bugs / Feature Requests
121              
122             Please report any bugs or feature requests through the issue tracker
123             at L.
124             You will be notified automatically of any progress on your issue.
125              
126             =head2 Source Code
127              
128             This is open source software. The code repository is available for
129             public review and contribution under the terms of the license.
130              
131             L
132              
133             git clone https://github.com/giterlizzi/perl-SBOM-CycloneDX.git
134              
135              
136             =head1 AUTHOR
137              
138             =over 4
139              
140             =item * Giuseppe Di Terlizzi
141              
142             =back
143              
144              
145             =head1 LICENSE AND COPYRIGHT
146              
147             This software is copyright (c) 2025-2026 by Giuseppe Di Terlizzi.
148              
149             This is free software; you can redistribute it and/or modify it under
150             the same terms as the Perl 5 programming language system itself.
151              
152             =cut