blib/lib/Crypt/Sodium/XS.pm

filter: Statementstmt 79.4% 31 / 39 Branchbran 50.0% 5 / 10 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 6 / 6 Podpod n/a totaltotal 76.3% 42 / 55 CC 1 SCAR 0.0
CC
1
Cov
73%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« xs/base64.xs ↑ Summary xs/hash.xs »
1 package Crypt::Sodium::XS;
2 26 ▶BEGIN {
Subroutine BEGIN: called CC=1 SCAR=0.0
3 # BEGIN block and use line for MemVault are for its overloads to work
4 26 our $VERSION = '0.002000';
5 26 require XSLoader;
6 26 XSLoader::load(__PACKAGE__, $VERSION);
7 }
8 26 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
9 26 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
10  
11 26 ▶use Exporter 'import';
Subroutine BEGIN: called CC=1 SCAR=0.0
12 26 ▶use Crypt::Sodium::XS::MemVault;
Subroutine BEGIN: called CC=1 SCAR=0.0
13 26 ▶use parent 'Crypt::Sodium::XS::Base';
Subroutine BEGIN: called CC=1 SCAR=0.0
14  
15 26 _define_constants();
16  
17 26 our %EXPORT_TAGS = (
18 functions => [qw[sodium_version_string]],
19 constants => [qw[
20 SODIUM_VERSION_STRING
21 SODIUM_LIBRARY_VERSION_MAJOR
22 SODIUM_LIBRARY_VERSION_MINOR
23 ]],
24 );
25 26 $EXPORT_TAGS{all} = [@{$EXPORT_TAGS{functions}}, @{$EXPORT_TAGS{constants}}];
26 26 our @EXPORT_OK = @{$EXPORT_TAGS{all}};
27  
28 # NB: Crypt::Sodium::XS::Protmem import not necessary, calling XSUBs directly.
29 26 ▶if (exists $ENV{PROTMEM_FLAGS_KEY}) {
Branch: 1 branch
BranchTrueFalseTotal
if (exists $ENV{"PROTMEM_FLAGS_KEY"}) 0 26 26
30 0 Crypt::Sodium::XS::ProtMem::protmem_default_flags_key($ENV{PROTMEM_FLAGS_KEY});
31 }
32 26 ▶if (exists $ENV{PROTMEM_FLAGS_DECRYPT}) {
Branch: 1 branch
BranchTrueFalseTotal
if (exists $ENV{"PROTMEM_FLAGS_DECRYPT"}) 0 26 26
33 0 Crypt::Sodium::XS::ProtMem::protmem_default_flags_decrypt($ENV{PROTMEM_FLAGS_DECRYPT});
34 }
35 26 ▶if (exists $ENV{PROTMEM_FLAGS_STATE}) {
Branch: 1 branch
BranchTrueFalseTotal
if (exists $ENV{"PROTMEM_FLAGS_STATE"}) 0 26 26
36 0 Crypt::Sodium::XS::ProtMem::protmem_default_flags_state($ENV{PROTMEM_FLAGS_STATE});
37 }
38 26 ▶if (exists $ENV{PROTMEM_FLAGS_MEMVAULT}) {
Branch: 1 branch
BranchTrueFalseTotal
if (exists $ENV{"PROTMEM_FLAGS_MEMVAULT"}) 0 26 26
39 0 Crypt::Sodium::XS::ProtMem::protmem_default_flags_memvault($ENV{PROTMEM_FLAGS_MEMVAULT});
40 }
41 26 ▶if (exists $ENV{PROTMEM_FLAGS_ALL}) {
Branch: 1 branch
BranchTrueFalseTotal
if (exists $ENV{"PROTMEM_FLAGS_ALL"}) 0 26 26
42 0 Crypt::Sodium::XS::ProtMem::protmem_default_flags_key($ENV{PROTMEM_FLAGS_ALL});
43 0 Crypt::Sodium::XS::ProtMem::protmem_default_flags_decrypt($ENV{PROTMEM_FLAGS_ALL});
44 0 Crypt::Sodium::XS::ProtMem::protmem_default_flags_state($ENV{PROTMEM_FLAGS_ALL});
45 0 Crypt::Sodium::XS::ProtMem::protmem_default_flags_memvault($ENV{PROTMEM_FLAGS_ALL});
46 }
47  
48 26 1;
49  
50 __END__
« xs/base64.xs ↑ Summary xs/hash.xs »