Profile of CryptX.pm

← Index
NYTProf Performance Profile «line view»
For t/bug-md-11.t
Run on Fri Mar 8 13:27:24 2024
Reported on Fri Mar 8 13:30:23 2024

Filename | /home/micha/.plenv/versions/5.38.2/lib/perl5/site_perl/5.38.2/x86_64-linux/CryptX.pm
Statements | Executed 14 statements in 785µs

Subroutines
Calls | P | F | Exclusive Time | Inclusive Time | Subroutine
--- | --- | --- | --- | --- | ---
1 | 1 | 1 | 1.11ms | 8.61ms | CryptX::::BEGIN@13CryptX::BEGIN@13
1 | 1 | 1 | 8µs | 9µs | CryptX::::BEGIN@3CryptX::BEGIN@3
1 | 1 | 1 | 4µs | 22µs | CryptX::::BEGIN@10CryptX::BEGIN@10
1 | 1 | 1 | 3µs | 16µs | CryptX::::BEGIN@4CryptX::BEGIN@4
0 | 0 | 0 | 0s | 0s | CryptX::::_croakCryptX::_croak
0 | 0 | 0 | 0s | 0s | CryptX::::_decode_jsonCryptX::_decode_json
0 | 0 | 0 | 0s | 0s | CryptX::::_encode_jsonCryptX::_encode_json

Call graph for these subroutines as a Graphviz dot language file.

Line | State ments | Time on line | Calls | Time in subs | Code
--- | --- | --- | --- | --- | ---
1 |  |  |  |  | package CryptX;
2 |  |  |  |  |
3 | 2 | 14µs | 2 | 10µs | # spent 9µs (8+1) within CryptX::BEGIN@3 which was called: # once (8µs+1µs) by Crypt::Cipher::BEGIN@9 at line 3 use strict; # spent 9µs making 1 call to CryptX::BEGIN@3 # spent 1µs making 1 call to strict::import
4 | 2 | 26µs | 2 | 29µs | # spent 16µs (3+13) within CryptX::BEGIN@4 which was called: # once (3µs+13µs) by Crypt::Cipher::BEGIN@9 at line 4 use warnings ; # spent 16µs making 1 call to CryptX::BEGIN@4 # spent 13µs making 1 call to warnings::import
5 | 1 | 300ns |  |  | our $VERSION = '0.080';
6 |  |  |  |  |
7 | 1 | 500ns |  |  | require XSLoader;
8 | 1 | 543µs | 1 | 537µs | XSLoader::load('CryptX', $VERSION); # spent 537µs making 1 call to XSLoader::load
9 |  |  |  |  |
10 | 2 | 25µs | 2 | 40µs | # spent 22µs (4+18) within CryptX::BEGIN@10 which was called: # once (4µs+18µs) by Crypt::Cipher::BEGIN@9 at line 10 use Carp; # spent 22µs making 1 call to CryptX::BEGIN@10 # spent 18µs making 1 call to Exporter::import
11 | 1 | 200ns |  |  | my $has_json;
12 |  |  |  |  |
13 |  |  |  |  | # spent 8.61ms (1.11+7.50) within CryptX::BEGIN@13 which was called: # once (1.11ms+7.50ms) by Crypt::Cipher::BEGIN@9 at line 15 BEGIN {
14 | 3 | 47µs |  |  | $has_json = 1 if eval { require JSON; 1 };
15 | 1 | 125µs | 1 | 8.61ms | } # spent 8.61ms making 1 call to CryptX::BEGIN@13
16 |  |  |  |  |
17 |  |  |  |  | sub _croak {
18 |  |  |  |  | die @_ if ref $_[0] || !$_[-1];
19 |  |  |  |  | if ($_[-1] =~ /^(.*)( at .+ line .+\n$)/s) {
20 |  |  |  |  | pop @_;
21 |  |  |  |  | push @_, $1;
22 |  |  |  |  | }
23 |  |  |  |  | die Carp::shortmess @_;
24 |  |  |  |  | }
25 |  |  |  |  |
26 |  |  |  |  | sub _decode_json {
27 |  |  |  |  | croak "FATAL: cannot find JSON module" if !$has_json;
28 |  |  |  |  | return JSON->new->utf8->decode(shift);
29 |  |  |  |  | }
30 |  |  |  |  |
31 |  |  |  |  | sub _encode_json {
32 |  |  |  |  | croak "FATAL: cannot find JSON module" if !$has_json;
33 |  |  |  |  | return JSON->new->utf8->canonical->encode(shift);
34 |  |  |  |  | }
35 |  |  |  |  |
36 | 1 | 4µs |  |  | 1;
37 |  |  |  |  |
38 |  |  |  |  | =pod
39 |  |  |  |  |
40 |  |  |  |  | =head1 NAME
41 |  |  |  |  |
42 |  |  |  |  | CryptX - Cryptographic toolkit
43 |  |  |  |  |
44 |  |  |  |  | =head1 DESCRIPTION
45 |  |  |  |  |
46 |  |  |  |  | Perl modules providing a cryptography based on L<LibTomCrypt|https://github.com/libtom/libtomcrypt> library.
47 |  |  |  |  |
48 |  |  |  |  | =over
49 |  |  |  |  |
50 |  |  |  |  | =item * Symmetric ciphers - see L<Crypt::Cipher> and related modules
51 |  |  |  |  |
52 |  |  |  |  | L<Crypt::Cipher::AES>, L<Crypt::Cipher::Anubis>, L<Crypt::Cipher::Blowfish>, L<Crypt::Cipher::Camellia>, L<Crypt::Cipher::CAST5>, L<Crypt::Cipher::DES>,
53 |  |  |  |  | L<Crypt::Cipher::DES_EDE>, L<Crypt::Cipher::IDEA>, L<Crypt::Cipher::KASUMI>, L<Crypt::Cipher::Khazad>, L<Crypt::Cipher::MULTI2>, L<Crypt::Cipher::Noekeon>,
54 |  |  |  |  | L<Crypt::Cipher::RC2>, L<Crypt::Cipher::RC5>, L<Crypt::Cipher::RC6>, L<Crypt::Cipher::SAFERP>, L<Crypt::Cipher::SAFER_K128>, L<Crypt::Cipher::SAFER_K64>,
55 |  |  |  |  | L<Crypt::Cipher::SAFER_SK128>, L<Crypt::Cipher::SAFER_SK64>, L<Crypt::Cipher::SEED>, L<Crypt::Cipher::Serpent>, L<Crypt::Cipher::Skipjack>,
56 |  |  |  |  | L<Crypt::Cipher::Twofish>, L<Crypt::Cipher::XTEA>
57 |  |  |  |  |
58 |  |  |  |  | =item * Block cipher modes
59 |  |  |  |  |
60 |  |  |  |  | L<Crypt::Mode::CBC>, L<Crypt::Mode::CFB>, L<Crypt::Mode::CTR>, L<Crypt::Mode::ECB>, L<Crypt::Mode::OFB>
61 |  |  |  |  |
62 |  |  |  |  | =item * Stream ciphers
63 |  |  |  |  |
64 |  |  |  |  | L<Crypt::Stream::RC4>, L<Crypt::Stream::ChaCha>, L<Crypt::Stream::Salsa20>, L<Crypt::Stream::Sober128>,
65 |  |  |  |  | L<Crypt::Stream::Sosemanuk>, L<Crypt::Stream::Rabbit>
66 |  |  |  |  |
67 |  |  |  |  | =item * Authenticated encryption modes
68 |  |  |  |  |
69 |  |  |  |  | L<Crypt::AuthEnc::CCM>, L<Crypt::AuthEnc::EAX>, L<Crypt::AuthEnc::GCM>, L<Crypt::AuthEnc::OCB>, L<Crypt::AuthEnc::ChaCha20Poly1305>
70 |  |  |  |  |
71 |  |  |  |  | =item * Hash Functions - see L<Crypt::Digest> and related modules
72 |  |  |  |  |
73 |  |  |  |  | L<Crypt::Digest::BLAKE2b_160>, L<Crypt::Digest::BLAKE2b_256>, L<Crypt::Digest::BLAKE2b_384>, L<Crypt::Digest::BLAKE2b_512>,
74 |  |  |  |  | L<Crypt::Digest::BLAKE2s_128>, L<Crypt::Digest::BLAKE2s_160>, L<Crypt::Digest::BLAKE2s_224>, L<Crypt::Digest::BLAKE2s_256>,
75 |  |  |  |  | L<Crypt::Digest::CHAES>, L<Crypt::Digest::MD2>, L<Crypt::Digest::MD4>, L<Crypt::Digest::MD5>, L<Crypt::Digest::RIPEMD128>, L<Crypt::Digest::RIPEMD160>,
76 |  |  |  |  | L<Crypt::Digest::RIPEMD256>, L<Crypt::Digest::RIPEMD320>, L<Crypt::Digest::SHA1>, L<Crypt::Digest::SHA224>, L<Crypt::Digest::SHA256>, L<Crypt::Digest::SHA384>,
77 |  |  |  |  | L<Crypt::Digest::SHA512>, L<Crypt::Digest::SHA512_224>, L<Crypt::Digest::SHA512_256>, L<Crypt::Digest::Tiger192>, L<Crypt::Digest::Whirlpool>,
78 |  |  |  |  | L<Crypt::Digest::Keccak224>, L<Crypt::Digest::Keccak256>, L<Crypt::Digest::Keccak384>, L<Crypt::Digest::Keccak512>,
79 |  |  |  |  | L<Crypt::Digest::SHA3_224>, L<Crypt::Digest::SHA3_256>, L<Crypt::Digest::SHA3_384>, L<Crypt::Digest::SHA3_512>, L<Crypt::Digest::SHAKE>
80 |  |  |  |  |
81 |  |  |  |  | =item * Checksums
82 |  |  |  |  |
83 |  |  |  |  | L<Crypt::Checksum::Adler32>, L<Crypt::Checksum::CRC32>
84 |  |  |  |  |
85 |  |  |  |  | =item * Message Authentication Codes
86 |  |  |  |  |
87 |  |  |  |  | L<Crypt::Mac::BLAKE2b>, L<Crypt::Mac::BLAKE2s>, L<Crypt::Mac::F9>, L<Crypt::Mac::HMAC>, L<Crypt::Mac::OMAC>,
88 |  |  |  |  | L<Crypt::Mac::Pelican>, L<Crypt::Mac::PMAC>, L<Crypt::Mac::XCBC>, L<Crypt::Mac::Poly1305>
89 |  |  |  |  |
90 |  |  |  |  | =item * Public key cryptography
91 |  |  |  |  |
92 |  |  |  |  | L<Crypt::PK::RSA>, L<Crypt::PK::DSA>, L<Crypt::PK::ECC>, L<Crypt::PK::DH>, L<Crypt::PK::Ed25519>, L<Crypt::PK::X25519>
93 |  |  |  |  |
94 |  |  |  |  | =item * Cryptographically secure random number generators - see L<Crypt::PRNG> and related modules
95 |  |  |  |  |
96 |  |  |  |  | L<Crypt::PRNG::Fortuna>, L<Crypt::PRNG::Yarrow>, L<Crypt::PRNG::RC4>, L<Crypt::PRNG::Sober128>, L<Crypt::PRNG::ChaCha20>
97 |  |  |  |  |
98 |  |  |  |  | =item * Key derivation functions - PBKDF1, PBKDF2 and HKDF
99 |  |  |  |  |
100 |  |  |  |  | L<Crypt::KeyDerivation>
101 |  |  |  |  |
102 |  |  |  |  | =item * Other handy functions related to cryptography
103 |  |  |  |  |
104 |  |  |  |  | L<Crypt::Misc>
105 |  |  |  |  |
106 |  |  |  |  | =back
107 |  |  |  |  |
108 |  |  |  |  | =head1 LICENSE
109 |  |  |  |  |
110 |  |  |  |  | This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
111 |  |  |  |  |
112 |  |  |  |  | =head1 COPYRIGHT
113 |  |  |  |  |
114 |  |  |  |  | Copyright (c) 2013-2023 DCIT, a.s. L<https://www.dcit.cz> / Karel Miko
115 |  |  |  |  |
116 |  |  |  |  | =cut