Update upstream source from tag 'upstream/0.076'
Update to upstream version '0.076'
with Debian dir 44666608c4d79aaa4949f0b892697c810714f7f7
gregor herrmann
2 years ago
0 | 0 | Changes for CryptX |
1 | ||
2 | 0.076 2022-01-07 | |
3 | - fix #80 github actions (mac, windows, cygwin) | |
4 | - fix #79 isolate ltc functions (via -Wl,--exclude-libs,ALL) | |
5 | - fix #68 Segmentation fault on Apache due to symbol clash with libasn1 | |
1 | 6 | |
2 | 7 | 0.075 2021-12-25 |
3 | 8 | - fix #78 bundled libtomcrypt update branch:develop (commit:673f5ce2 2021-06-04) |
161 | 161 | int initialized; |
162 | 162 | } *Crypt__PK__X25519; |
163 | 163 | |
164 | int mp_tohex_with_leading_zero(mp_int * a, char *str, int maxlen, int minlen) { | |
164 | STATIC int cryptx_internal_mp2hex_with_leading_zero(mp_int * a, char *str, int maxlen, int minlen) { | |
165 | 165 | int len, rv; |
166 | 166 | |
167 | 167 | if (mp_isneg(a) == MP_YES) { |
190 | 190 | return MP_OKAY; |
191 | 191 | } |
192 | 192 | |
193 | size_t _find_start(const char *name, char *ltcname, size_t ltclen) | |
193 | STATIC size_t cryptx_internal_find_start(const char *name, char *ltcname, size_t ltclen) | |
194 | 194 | { |
195 | 195 | size_t i, start = 0; |
196 | 196 | if (name == NULL || strlen(name) + 1 > ltclen) croak("FATAL: invalid name") ; |
210 | 210 | return start; |
211 | 211 | } |
212 | 212 | |
213 | int _find_hash(const char *name) | |
213 | STATIC int cryptx_internal_find_hash(const char *name) | |
214 | 214 | { |
215 | 215 | char ltcname[100] = { 0 }; |
216 | size_t start = _find_start(name, ltcname, sizeof(ltcname) - 1); | |
216 | size_t start = cryptx_internal_find_start(name, ltcname, sizeof(ltcname) - 1); | |
217 | 217 | /* special cases */ |
218 | 218 | if (strcmp(ltcname + start, "ripemd128") == 0) return find_hash("rmd128"); |
219 | 219 | if (strcmp(ltcname + start, "ripemd160") == 0) return find_hash("rmd160"); |
225 | 225 | return find_hash(ltcname + start); |
226 | 226 | } |
227 | 227 | |
228 | int _find_cipher(const char *name) | |
228 | STATIC int cryptx_internal_find_cipher(const char *name) | |
229 | 229 | { |
230 | 230 | char ltcname[100] = { 0 }; |
231 | size_t start = _find_start(name, ltcname, sizeof(ltcname) - 1); | |
231 | size_t start = cryptx_internal_find_start(name, ltcname, sizeof(ltcname) - 1); | |
232 | 232 | /* special cases */ |
233 | 233 | if (strcmp(ltcname + start, "des-ede") == 0) return find_cipher("3des"); |
234 | 234 | if (strcmp(ltcname + start, "saferp") == 0) return find_cipher("safer+"); |
235 | 235 | return find_cipher(ltcname + start); |
236 | 236 | } |
237 | 237 | |
238 | int _find_prng(const char *name) | |
238 | STATIC int cryptx_internal_find_prng(const char *name) | |
239 | 239 | { |
240 | 240 | char ltcname[100] = { 0 }; |
241 | size_t start = _find_start(name, ltcname, sizeof(ltcname) - 1); | |
241 | size_t start = cryptx_internal_find_start(name, ltcname, sizeof(ltcname) - 1); | |
242 | 242 | return find_prng(ltcname + start); |
243 | 243 | } |
244 | 244 | |
251 | 251 | return obj; |
252 | 252 | } |
253 | 253 | |
254 | void _ecc_oid_lookup(ecc_key *key) | |
254 | STATIC void cryptx_internal_ecc_oid_lookup(ecc_key *key) | |
255 | 255 | { |
256 | 256 | int err; |
257 | 257 | unsigned i, j; |
294 | 294 | } |
295 | 295 | } |
296 | 296 | |
297 | int _ecc_set_curve_from_SV(ecc_key *key, SV *curve) | |
297 | STATIC int cryptx_internal_ecc_set_curve_from_SV(ecc_key *key, SV *curve) | |
298 | 298 | { |
299 | 299 | dTHX; /* fetch context */ |
300 | 300 | HV *hc, *h; |
367 | 367 | cu.cofactor = (unsigned long)SvUV(*sv_cofactor); |
368 | 368 | |
369 | 369 | if ((err = ecc_set_curve(&cu, key)) != CRYPT_OK) return err; |
370 | if (key->dp.oidlen == 0) _ecc_oid_lookup(key); | |
370 | if (key->dp.oidlen == 0) cryptx_internal_ecc_oid_lookup(key); | |
371 | 371 | return CRYPT_OK; |
372 | 372 | } |
373 | 373 | } |
50 | 50 | "url" : "https://github.com/DCIT/perl-CryptX" |
51 | 51 | } |
52 | 52 | }, |
53 | "version" : "0.075", | |
53 | "version" : "0.076", | |
54 | 54 | "x_serialization_backend" : "JSON::PP version 4.07" |
55 | 55 | } |
23 | 23 | resources: |
24 | 24 | bugtracker: https://github.com/DCIT/perl-CryptX/issues |
25 | 25 | repository: https://github.com/DCIT/perl-CryptX |
26 | version: '0.075' | |
26 | version: '0.076' | |
27 | 27 | x_serialization_backend: 'CPAN::Meta::YAML version 0.018' |
61 | 61 | MYEXTLIB => "src/liballinone$Config{lib_ext}", |
62 | 62 | clean => { 'FILES' => join(' ', @myobjs, "src/liballinone$Config{lib_ext}") }, |
63 | 63 | ); |
64 | ||
65 | #FIX: https://github.com/DCIT/perl-CryptX/pull/79 | |
66 | # not needed on MS Windows | |
67 | # does not work on macos - Apple LLVM 12.0.5 (clang-1205.0.22.9) ld: unknown option: --exclude-libs | |
68 | # does not work on solaris - gcc 9.3.0 - ld: fatal: unrecognized option '--exclude-libs' | |
69 | if ($^O !~ /^(MSWin32|darwin|solaris)$/ && ($Config{ld} =~ /gcc|g\+\+/ || $Config{gccversion})) { | |
70 | push @EUMM_INC_LIB, (LDDLFLAGS => "$Config{lddlflags} -Wl,--exclude-libs,ALL"); | |
71 | } | |
64 | 72 | } |
65 | 73 | |
66 | 74 | my %eumm_args = ( |
136 | 144 | |
137 | 145 | return $extra_targets; |
138 | 146 | } |
147 |
67 | 67 | |
68 | 68 | # COPYRIGHT |
69 | 69 | |
70 | Copyright (c) 2013-2021 DCIT, a.s. [https://www.dcit.cz](https://www.dcit.cz) / Karel Miko | |
70 | Copyright (c) 2013-2022 DCIT, a.s. [https://www.dcit.cz](https://www.dcit.cz) / Karel Miko |
22 | 22 | if (!SvPOK(adata)) croak("FATAL: adata must be string/buffer scalar"); |
23 | 23 | h = (unsigned char *) SvPVbyte(adata, h_len); |
24 | 24 | |
25 | id = _find_cipher(cipher_name); | |
25 | id = cryptx_internal_find_cipher(cipher_name); | |
26 | 26 | if (id == -1) croak("FATAL: find_cipfer failed for '%s'", cipher_name); |
27 | 27 | |
28 | 28 | Newz(0, RETVAL, 1, ccm_state); |
173 | 173 | if (SvPOK(plaintext)) pt = (unsigned char *) SvPVbyte(plaintext, pt_len); |
174 | 174 | if (SvPOK(header)) h = (unsigned char *) SvPVbyte(header, h_len); |
175 | 175 | |
176 | id = _find_cipher(cipher_name); | |
176 | id = cryptx_internal_find_cipher(cipher_name); | |
177 | 177 | if(id==-1) croak("FATAL: find_cipfer failed for '%s'", cipher_name); |
178 | 178 | output = NEWSV(0, pt_len > 0 ? pt_len : 1); /* avoid zero! */ |
179 | 179 | SvPOK_only(output); |
208 | 208 | if (SvPOK(tagsv)) t = (unsigned char *) SvPVbyte(tagsv, t_len); |
209 | 209 | if (SvPOK(header)) h = (unsigned char *) SvPVbyte(header, h_len); |
210 | 210 | |
211 | id = _find_cipher(cipher_name); | |
211 | id = cryptx_internal_find_cipher(cipher_name); | |
212 | 212 | if(id==-1) croak("FATAL: find_cipfer failed for '%s'", cipher_name); |
213 | 213 | output = NEWSV(0, ct_len > 0 ? ct_len : 1); /* avoid zero! */ |
214 | 214 | SvPOK_only(output); |
22 | 22 | h = (unsigned char *) SvPVbyte(adata, h_len); |
23 | 23 | } |
24 | 24 | |
25 | id = _find_cipher(cipher_name); | |
25 | id = cryptx_internal_find_cipher(cipher_name); | |
26 | 26 | if (id == -1) croak("FATAL: find_cipfer failed for '%s'", cipher_name); |
27 | 27 | |
28 | 28 | Newz(0, RETVAL, 1, eax_state); |
177 | 177 | if (SvPOK(plaintext)) pt = (unsigned char *) SvPVbyte(plaintext, pt_len); |
178 | 178 | if (SvPOK(header)) h = (unsigned char *) SvPVbyte(header, h_len); |
179 | 179 | |
180 | id = _find_cipher(cipher_name); | |
180 | id = cryptx_internal_find_cipher(cipher_name); | |
181 | 181 | if(id==-1) croak("FATAL: find_cipfer failed for '%s'", cipher_name); |
182 | 182 | output = NEWSV(0, pt_len > 0 ? pt_len : 1); /* avoid zero! */ |
183 | 183 | SvPOK_only(output); |
212 | 212 | if (SvPOK(tagsv)) t = (unsigned char *) SvPVbyte(tagsv, t_len); |
213 | 213 | if (SvPOK(header)) h = (unsigned char *) SvPVbyte(header, h_len); |
214 | 214 | |
215 | id = _find_cipher(cipher_name); | |
215 | id = cryptx_internal_find_cipher(cipher_name); | |
216 | 216 | if(id==-1) croak("FATAL: find_cipfer failed for '%s'", cipher_name); |
217 | 217 | output = NEWSV(0, ct_len > 0 ? ct_len : 1); /* avoid zero! */ |
218 | 218 | SvPOK_only(output); |
16 | 16 | iv = (unsigned char *)SvPVbyte(nonce, iv_len); |
17 | 17 | } |
18 | 18 | |
19 | id = _find_cipher(cipher_name); | |
19 | id = cryptx_internal_find_cipher(cipher_name); | |
20 | 20 | if (id == -1) croak("FATAL: find_cipfer failed for '%s'", cipher_name); |
21 | 21 | |
22 | 22 | Newz(0, RETVAL, 1, gcm_state); |
206 | 206 | if (SvPOK(plaintext)) pt = (unsigned char *) SvPVbyte(plaintext, pt_len); |
207 | 207 | if (SvPOK(header)) h = (unsigned char *) SvPVbyte(header, h_len); |
208 | 208 | |
209 | id = _find_cipher(cipher_name); | |
209 | id = cryptx_internal_find_cipher(cipher_name); | |
210 | 210 | if(id==-1) croak("FATAL: find_cipfer failed for '%s'", cipher_name); |
211 | 211 | output = NEWSV(0, pt_len > 0 ? pt_len : 1); /* avoid zero! */ |
212 | 212 | SvPOK_only(output); |
240 | 240 | if (SvPOK(tagsv)) t = (unsigned char *) SvPVbyte(tagsv, t_len); |
241 | 241 | if (SvPOK(header)) h = (unsigned char *) SvPVbyte(header, h_len); |
242 | 242 | |
243 | id = _find_cipher(cipher_name); | |
243 | id = cryptx_internal_find_cipher(cipher_name); | |
244 | 244 | if(id==-1) croak("FATAL: find_cipfer failed for '%s'", cipher_name); |
245 | 245 | output = NEWSV(0, ct_len > 0 ? ct_len : 1); /* avoid zero! */ |
246 | 246 | SvPOK_only(output); |
16 | 16 | if (!SvPOK(nonce)) croak("FATAL: nonce must be string/buffer scalar"); |
17 | 17 | n = (unsigned char *) SvPVbyte(nonce, n_len); |
18 | 18 | |
19 | id = _find_cipher(cipher_name); | |
19 | id = cryptx_internal_find_cipher(cipher_name); | |
20 | 20 | if (id == -1) croak("FATAL: find_cipfer failed for '%s'", cipher_name); |
21 | 21 | |
22 | 22 | Newz(0, RETVAL, 1, ocb3_state); |
243 | 243 | if (SvPOK(plaintext)) pt = (unsigned char *) SvPVbyte(plaintext, pt_len); |
244 | 244 | if (SvPOK(header)) h = (unsigned char *) SvPVbyte(header, h_len); |
245 | 245 | |
246 | id = _find_cipher(cipher_name); | |
246 | id = cryptx_internal_find_cipher(cipher_name); | |
247 | 247 | if(id==-1) croak("FATAL: find_cipfer failed for '%s'", cipher_name); |
248 | 248 | output = NEWSV(0, pt_len > 0 ? pt_len : 1); /* avoid zero! */ |
249 | 249 | SvPOK_only(output); |
277 | 277 | if (SvPOK(tagsv)) t = (unsigned char *) SvPVbyte(tagsv, t_len); |
278 | 278 | if (SvPOK(header)) h = (unsigned char *) SvPVbyte(header, h_len); |
279 | 279 | |
280 | id = _find_cipher(cipher_name); | |
280 | id = cryptx_internal_find_cipher(cipher_name); | |
281 | 281 | if(id==-1) croak("FATAL: find_cipfer failed for '%s'", cipher_name); |
282 | 282 | output = NEWSV(0, ct_len > 0 ? ct_len : 1); /* avoid zero! */ |
283 | 283 | SvPOK_only(output); |
24 | 24 | if (!SvPOK (key)) croak("FATAL: key must be string scalar"); |
25 | 25 | key_data = (unsigned char *)SvPVbyte(key, key_len); |
26 | 26 | |
27 | id = _find_cipher(cipher_name); | |
27 | id = cryptx_internal_find_cipher(cipher_name); | |
28 | 28 | if (id == -1) croak("FATAL: find_cipfer failed for '%s'", cipher_name); |
29 | 29 | |
30 | 30 | Newz(0, RETVAL, 1, struct cipher_struct); |
112 | 112 | } |
113 | 113 | else { |
114 | 114 | char *name = SvPOK(param) && strcmp(SvPVX(param), "Crypt::Cipher") ? SvPVX(param) : extra; |
115 | int rv, id = _find_cipher(name); | |
115 | int rv, id = cryptx_internal_find_cipher(name); | |
116 | 116 | if (id == -1) croak("FATAL: find_cipher failed for '%s'", name); |
117 | 117 | rv = cipher_descriptor[id].block_length; |
118 | 118 | if (!rv) croak("FATAL: invalid block_length for '%s'", name); |
133 | 133 | } |
134 | 134 | else { |
135 | 135 | char *name = SvPOK(param) && strcmp(SvPVX(param), "Crypt::Cipher") ? SvPVX(param) : extra; |
136 | int rv, id = _find_cipher(name); | |
136 | int rv, id = cryptx_internal_find_cipher(name); | |
137 | 137 | if (id == -1) croak("FATAL: find_cipher failed for '%s'", name); |
138 | 138 | rv = cipher_descriptor[id].max_key_length; |
139 | 139 | if (!rv) croak("FATAL: invalid max_key_length for '%s'", name); |
154 | 154 | } |
155 | 155 | else { |
156 | 156 | char *name = SvPOK(param) && strcmp(SvPVX(param), "Crypt::Cipher") ? SvPVX(param) : extra; |
157 | int rv, id = _find_cipher(name); | |
157 | int rv, id = cryptx_internal_find_cipher(name); | |
158 | 158 | if (id == -1) croak("FATAL: find_cipher failed for '%s'", name); |
159 | 159 | rv = cipher_descriptor[id].min_key_length; |
160 | 160 | if (!rv) croak("FATAL: invalid min_key_length for '%s'", name); |
175 | 175 | } |
176 | 176 | else { |
177 | 177 | char *name = SvPOK(param) && strcmp(SvPVX(param), "Crypt::Cipher") ? SvPVX(param) : extra; |
178 | int rv, id = _find_cipher(name); | |
178 | int rv, id = cryptx_internal_find_cipher(name); | |
179 | 179 | if (id == -1) croak("FATAL: find_cipher failed for '%s'", name); |
180 | 180 | rv = cipher_descriptor[id].default_rounds; |
181 | 181 | if (!rv) XSRETURN_UNDEF; |
9 | 9 | int id; |
10 | 10 | char *digest_name = strcmp(cname, "Crypt::Digest") == 0 ? pname : cname; |
11 | 11 | |
12 | id = _find_hash(digest_name); | |
12 | id = cryptx_internal_find_hash(digest_name); | |
13 | 13 | if (id == -1) croak("FATAL: find_hash failed for '%s'", digest_name); |
14 | 14 | |
15 | 15 | Newz(0, RETVAL, 1, struct digest_struct); |
121 | 121 | char out[MAXBLOCKSIZE*2+1]; |
122 | 122 | hash_state md; |
123 | 123 | |
124 | id = _find_hash(digest_name); | |
124 | id = cryptx_internal_find_hash(digest_name); | |
125 | 125 | if (id == -1) croak("FATAL: find_digest failed for '%s'", digest_name); |
126 | 126 | |
127 | 127 | /* digest_data("SHA1", $data1, $data2, $data3); */ |
174 | 174 | char *digest_name; |
175 | 175 | int rv, id; |
176 | 176 | digest_name = SvPOK(param) && strcmp(SvPVX(param), "Crypt::Digest") ? SvPVX(param) : extra; |
177 | id = _find_hash(digest_name); | |
177 | id = cryptx_internal_find_hash(digest_name); | |
178 | 178 | if (id == -1) croak("FATAL: find_hash failed for '%s'", digest_name); |
179 | 179 | rv = hash_descriptor[id].hashsize; |
180 | 180 | if (!rv) croak("FATAL: invalid hashsize for '%s'", digest_name);; |
16 | 16 | RETVAL = newSVpvn("", 0); |
17 | 17 | } |
18 | 18 | else { |
19 | id = _find_hash(hash_name); | |
19 | id = cryptx_internal_find_hash(hash_name); | |
20 | 20 | if (id == -1) croak("FATAL: find_hash failed for '%s'", hash_name); |
21 | 21 | |
22 | 22 | password_ptr = (unsigned char *)SvPVbyte(password, password_len); |
54 | 54 | RETVAL = newSVpvn("", 0); |
55 | 55 | } |
56 | 56 | else { |
57 | id = _find_hash(hash_name); | |
57 | id = cryptx_internal_find_hash(hash_name); | |
58 | 58 | if (id == -1) croak("FATAL: find_hash failed for '%s'", hash_name); |
59 | 59 | |
60 | 60 | password_ptr = (unsigned char *)SvPVbyte(password, password_len); |
86 | 86 | unsigned char *in_ptr = NULL, *salt_ptr = NULL; |
87 | 87 | STRLEN in_len = 0, salt_len = 0; |
88 | 88 | |
89 | id = _find_hash(hash_name); | |
89 | id = cryptx_internal_find_hash(hash_name); | |
90 | 90 | if (id == -1) croak("FATAL: find_hash failed for '%s'", hash_name); |
91 | 91 | |
92 | 92 | if (SvPOK(in)) in_ptr = (unsigned char *)SvPVbyte(in, in_len); |
114 | 114 | RETVAL = newSVpvn("", 0); |
115 | 115 | } |
116 | 116 | else { |
117 | id = _find_hash(hash_name); | |
117 | id = cryptx_internal_find_hash(hash_name); | |
118 | 118 | if (id == -1) croak("FATAL: find_hash failed for '%s'", hash_name); |
119 | 119 | |
120 | 120 | if (SvPOK(in)) in_ptr = (unsigned char *)SvPVbyte(in, in_len); |
149 | 149 | RETVAL = newSVpvn("", 0); |
150 | 150 | } |
151 | 151 | else { |
152 | id = _find_hash(hash_name); | |
152 | id = cryptx_internal_find_hash(hash_name); | |
153 | 153 | if (id == -1) croak("FATAL: find_hash failed for '%s'", hash_name); |
154 | 154 | |
155 | 155 | if (SvPOK(in)) in_ptr = (unsigned char *)SvPVbyte(in, in_len); |
12 | 12 | int rv; |
13 | 13 | int id; |
14 | 14 | |
15 | id = _find_cipher(cipher_name); | |
15 | id = cryptx_internal_find_cipher(cipher_name); | |
16 | 16 | if (id == -1) croak("FATAL: find_cipfer failed for '%s'", cipher_name); |
17 | 17 | |
18 | 18 | if (!SvPOK(key)) croak("FATAL: key must be string/buffer scalar"); |
118 | 118 | char out[MAXBLOCKSIZE*2]; |
119 | 119 | f9_state st; |
120 | 120 | |
121 | int id = _find_cipher(cipher_name); | |
121 | int id = cryptx_internal_find_cipher(cipher_name); | |
122 | 122 | if (id == -1) croak("FATAL: find_cipher failed for '%s'", cipher_name); |
123 | 123 | rv = f9_init(&st, id, k, (unsigned long)klen); |
124 | 124 | if (rv != CRYPT_OK) croak("FATAL: f9_init failed: %s", error_to_string(rv)); |
12 | 12 | int rv; |
13 | 13 | int id; |
14 | 14 | |
15 | id = _find_hash(hash_name); | |
15 | id = cryptx_internal_find_hash(hash_name); | |
16 | 16 | if (id == -1) croak("FATAL: find_hash failed for '%s'", hash_name); |
17 | 17 | |
18 | 18 | if (!SvPOK(key)) croak("FATAL: key must be string/buffer scalar"); |
118 | 118 | char out[MAXBLOCKSIZE*2]; |
119 | 119 | hmac_state st; |
120 | 120 | |
121 | int id = _find_hash(hash_name); | |
121 | int id = cryptx_internal_find_hash(hash_name); | |
122 | 122 | if (id == -1) croak("FATAL: find_digest failed for '%s'", hash_name); |
123 | 123 | rv = hmac_init(&st, id, k, (unsigned long)klen); |
124 | 124 | if (rv != CRYPT_OK) croak("FATAL: hmac_init failed: %s", error_to_string(rv)); |
12 | 12 | int rv; |
13 | 13 | int id; |
14 | 14 | |
15 | id = _find_cipher(cipher_name); | |
15 | id = cryptx_internal_find_cipher(cipher_name); | |
16 | 16 | if (id == -1) croak("FATAL: find_cipfer failed for '%s'", cipher_name); |
17 | 17 | |
18 | 18 | if (!SvPOK(key)) croak("FATAL: key must be string/buffer scalar"); |
118 | 118 | char out[MAXBLOCKSIZE*2]; |
119 | 119 | omac_state st; |
120 | 120 | |
121 | int id = _find_cipher(cipher_name); | |
121 | int id = cryptx_internal_find_cipher(cipher_name); | |
122 | 122 | if (id == -1) croak("FATAL: find_cipher failed for '%s'", cipher_name); |
123 | 123 | rv = omac_init(&st, id, k, (unsigned long)klen); |
124 | 124 | if (rv != CRYPT_OK) croak("FATAL: omac_init failed: %s", error_to_string(rv)); |
12 | 12 | int rv; |
13 | 13 | int id; |
14 | 14 | |
15 | id = _find_cipher(cipher_name); | |
15 | id = cryptx_internal_find_cipher(cipher_name); | |
16 | 16 | if (id == -1) croak("FATAL: find_cipfer failed for '%s'", cipher_name); |
17 | 17 | |
18 | 18 | if (!SvPOK(key)) croak("FATAL: key must be string/buffer scalar"); |
118 | 118 | char out[MAXBLOCKSIZE*2]; |
119 | 119 | pmac_state st; |
120 | 120 | |
121 | int id = _find_cipher(cipher_name); | |
121 | int id = cryptx_internal_find_cipher(cipher_name); | |
122 | 122 | if (id == -1) croak("FATAL: find_cipher failed for '%s'", cipher_name); |
123 | 123 | rv = pmac_init(&st, id, k, (unsigned long)klen); |
124 | 124 | if (rv != CRYPT_OK) croak("FATAL: pmac_init failed: %s", error_to_string(rv)); |
12 | 12 | int rv; |
13 | 13 | int id; |
14 | 14 | |
15 | id = _find_cipher(cipher_name); | |
15 | id = cryptx_internal_find_cipher(cipher_name); | |
16 | 16 | if (id == -1) croak("FATAL: find_cipfer failed for '%s'", cipher_name); |
17 | 17 | |
18 | 18 | if (!SvPOK(key)) croak("FATAL: key must be string/buffer scalar"); |
118 | 118 | char out[MAXBLOCKSIZE*2]; |
119 | 119 | xcbc_state st; |
120 | 120 | |
121 | int id = _find_cipher(cipher_name); | |
121 | int id = cryptx_internal_find_cipher(cipher_name); | |
122 | 122 | if (id == -1) croak("FATAL: find_cipher failed for '%s'", cipher_name); |
123 | 123 | rv = xcbc_init(&st, id, k, (unsigned long)klen); |
124 | 124 | if (rv != CRYPT_OK) croak("FATAL: xcbc_init failed: %s", error_to_string(rv)); |
13 | 13 | RETVAL->padlen = 0; |
14 | 14 | RETVAL->direction = 0; |
15 | 15 | RETVAL->cipher_rounds = rounds; |
16 | RETVAL->cipher_id = _find_cipher(cipher_name); | |
16 | RETVAL->cipher_id = cryptx_internal_find_cipher(cipher_name); | |
17 | 17 | if (RETVAL->cipher_id == -1) { |
18 | 18 | Safefree(RETVAL); |
19 | 19 | croak("FATAL: find_cipfer failed for '%s'", cipher_name); |
11 | 11 | if (!RETVAL) croak("FATAL: Newz failed"); |
12 | 12 | RETVAL->direction = 0; |
13 | 13 | RETVAL->cipher_rounds = rounds; |
14 | RETVAL->cipher_id = _find_cipher(cipher_name); | |
14 | RETVAL->cipher_id = cryptx_internal_find_cipher(cipher_name); | |
15 | 15 | if (RETVAL->cipher_id == -1) { |
16 | 16 | Safefree(RETVAL); |
17 | 17 | croak("FATAL: find_cipfer failed for '%s'", cipher_name); |
11 | 11 | if (!RETVAL) croak("FATAL: Newz failed"); |
12 | 12 | RETVAL->direction = 0; |
13 | 13 | RETVAL->cipher_rounds = rounds; |
14 | RETVAL->cipher_id = _find_cipher(cipher_name); | |
14 | RETVAL->cipher_id = cryptx_internal_find_cipher(cipher_name); | |
15 | 15 | if (RETVAL->cipher_id == -1) { |
16 | 16 | Safefree(RETVAL); |
17 | 17 | croak("FATAL: find_cipfer failed for '%s'", cipher_name); |
13 | 13 | RETVAL->padlen = 0; |
14 | 14 | RETVAL->direction = 0; |
15 | 15 | RETVAL->cipher_rounds = rounds; |
16 | RETVAL->cipher_id = _find_cipher(cipher_name); | |
16 | RETVAL->cipher_id = cryptx_internal_find_cipher(cipher_name); | |
17 | 17 | if (RETVAL->cipher_id == -1) { |
18 | 18 | Safefree(RETVAL); |
19 | 19 | croak("FATAL: find_cipfer failed for '%s'", cipher_name); |
11 | 11 | if (!RETVAL) croak("FATAL: Newz failed"); |
12 | 12 | RETVAL->direction = 0; |
13 | 13 | RETVAL->cipher_rounds = rounds; |
14 | RETVAL->cipher_id = _find_cipher(cipher_name); | |
14 | RETVAL->cipher_id = cryptx_internal_find_cipher(cipher_name); | |
15 | 15 | if (RETVAL->cipher_id == -1) { |
16 | 16 | Safefree(RETVAL); |
17 | 17 | croak("FATAL: find_cipfer failed for '%s'", cipher_name); |
162 | 162 | croak("FATAL: key2hash failed - 'x' too big number"); |
163 | 163 | } |
164 | 164 | if (siz>0) { |
165 | mp_tohex_with_leading_zero(self->key.x, buf, 20000, 0); | |
165 | cryptx_internal_mp2hex_with_leading_zero(self->key.x, buf, 20000, 0); | |
166 | 166 | not_used = hv_store(rv_hash, "x", 1, newSVpv(buf, strlen(buf)), 0); |
167 | 167 | } |
168 | 168 | else{ |
174 | 174 | croak("FATAL: key2hash failed - 'y' too big number"); |
175 | 175 | } |
176 | 176 | if (siz>0) { |
177 | mp_tohex_with_leading_zero(self->key.y, buf, 20000, 0); | |
177 | cryptx_internal_mp2hex_with_leading_zero(self->key.y, buf, 20000, 0); | |
178 | 178 | not_used = hv_store(rv_hash, "y", 1, newSVpv(buf, strlen(buf)), 0); |
179 | 179 | } |
180 | 180 | else{ |
186 | 186 | croak("FATAL: key2hash failed - 'p' too big number"); |
187 | 187 | } |
188 | 188 | if (siz>0) { |
189 | mp_tohex_with_leading_zero(self->key.prime, buf, 20000, 0); | |
189 | cryptx_internal_mp2hex_with_leading_zero(self->key.prime, buf, 20000, 0); | |
190 | 190 | not_used = hv_store(rv_hash, "p", 1, newSVpv(buf, strlen(buf)), 0); |
191 | 191 | } |
192 | 192 | else { |
199 | 199 | croak("FATAL: key2hash failed - 'g' too big number"); |
200 | 200 | } |
201 | 201 | if (siz>0) { |
202 | mp_tohex_with_leading_zero(self->key.base, buf, 20000, 0); | |
202 | cryptx_internal_mp2hex_with_leading_zero(self->key.base, buf, 20000, 0); | |
203 | 203 | not_used = hv_store(rv_hash, "g", 1, newSVpv(buf, strlen(buf)), 0); |
204 | 204 | } |
205 | 205 | else { |
230 | 230 | croak("FATAL: key2hash failed - 'p' too big number"); |
231 | 231 | } |
232 | 232 | if (siz>0) { |
233 | mp_tohex_with_leading_zero(self->key.prime, buf, 20000, 0); | |
233 | cryptx_internal_mp2hex_with_leading_zero(self->key.prime, buf, 20000, 0); | |
234 | 234 | not_used = hv_store(rv_hash, "p", 1, newSVpv(buf, strlen(buf)), 0); |
235 | 235 | } |
236 | 236 | else { |
243 | 243 | croak("FATAL: key2hash failed - 'g' too big number"); |
244 | 244 | } |
245 | 245 | if (siz>0) { |
246 | mp_tohex_with_leading_zero(self->key.base, buf, 20000, 0); | |
246 | cryptx_internal_mp2hex_with_leading_zero(self->key.base, buf, 20000, 0); | |
247 | 247 | not_used = hv_store(rv_hash, "g", 1, newSVpv(buf, strlen(buf)), 0); |
248 | 248 | } |
249 | 249 | else { |
172 | 172 | croak("FATAL: key2hash failed - 'g' too big number"); |
173 | 173 | } |
174 | 174 | if (siz>0) { |
175 | mp_tohex_with_leading_zero(self->key.g, buf, 20000, 0); | |
175 | cryptx_internal_mp2hex_with_leading_zero(self->key.g, buf, 20000, 0); | |
176 | 176 | not_used = hv_store(rv_hash, "g", 1, newSVpv(buf, strlen(buf)), 0); |
177 | 177 | } |
178 | 178 | else{ |
184 | 184 | croak("FATAL: key2hash failed - 'q' too big number"); |
185 | 185 | } |
186 | 186 | if (siz>0) { |
187 | mp_tohex_with_leading_zero(self->key.q, buf, 20000, 0); | |
187 | cryptx_internal_mp2hex_with_leading_zero(self->key.q, buf, 20000, 0); | |
188 | 188 | not_used = hv_store(rv_hash, "q", 1, newSVpv(buf, strlen(buf)), 0); |
189 | 189 | } |
190 | 190 | else{ |
196 | 196 | croak("FATAL: key2hash failed - 'p' too big number"); |
197 | 197 | } |
198 | 198 | if (siz>0) { |
199 | mp_tohex_with_leading_zero(self->key.p, buf, 20000, 0); | |
199 | cryptx_internal_mp2hex_with_leading_zero(self->key.p, buf, 20000, 0); | |
200 | 200 | not_used = hv_store(rv_hash, "p", 1, newSVpv(buf, strlen(buf)), 0); |
201 | 201 | } |
202 | 202 | else{ |
208 | 208 | croak("FATAL: key2hash failed - 'x' too big number"); |
209 | 209 | } |
210 | 210 | if (siz>0) { |
211 | mp_tohex_with_leading_zero(self->key.x, buf, 20000, qsize*2); | |
211 | cryptx_internal_mp2hex_with_leading_zero(self->key.x, buf, 20000, qsize*2); | |
212 | 212 | not_used = hv_store(rv_hash, "x", 1, newSVpv(buf, strlen(buf)), 0); |
213 | 213 | } |
214 | 214 | else{ |
220 | 220 | croak("FATAL: key2hash failed - 'y' too big number"); |
221 | 221 | } |
222 | 222 | if (siz>0) { |
223 | mp_tohex_with_leading_zero(self->key.y, buf, 20000, psize*2); | |
223 | cryptx_internal_mp2hex_with_leading_zero(self->key.y, buf, 20000, psize*2); | |
224 | 224 | not_used = hv_store(rv_hash, "y", 1, newSVpv(buf, strlen(buf)), 0); |
225 | 225 | } |
226 | 226 | else{ |
273 | 273 | |
274 | 274 | data_ptr = (unsigned char *)SvPVbyte(data, data_len); |
275 | 275 | |
276 | hash_id = _find_hash(hash_name); | |
276 | hash_id = cryptx_internal_find_hash(hash_name); | |
277 | 277 | if (hash_id == -1) croak("FATAL: find_hash failed for '%s'", hash_name); |
278 | 278 | rv = dsa_encrypt_key(data_ptr, (unsigned long)data_len, buffer, &buffer_len, |
279 | 279 | &self->pstate, self->pindex, |
316 | 316 | |
317 | 317 | data_ptr = (unsigned char *)SvPVbyte(data, data_len); |
318 | 318 | if (ix == 1) { |
319 | id = _find_hash(hash_name); | |
319 | id = cryptx_internal_find_hash(hash_name); | |
320 | 320 | if (id == -1) croak("FATAL: find_hash failed for '%s'", hash_name); |
321 | 321 | rv = hash_memory(id, data_ptr, (unsigned long)data_len, tmp, &tmp_len); |
322 | 322 | if (rv != CRYPT_OK) croak("FATAL: hash_memory failed: %s", error_to_string(rv)); |
346 | 346 | data_ptr = (unsigned char *)SvPVbyte(data, data_len); |
347 | 347 | sig_ptr = (unsigned char *)SvPVbyte(sig, sig_len); |
348 | 348 | if (ix == 1) { |
349 | id = _find_hash(hash_name); | |
349 | id = cryptx_internal_find_hash(hash_name); | |
350 | 350 | if (id == -1) croak("FATAL: find_hash failed for '%s'", hash_name); |
351 | 351 | rv = hash_memory(id, data_ptr, (unsigned long)data_len, tmp, &tmp_len); |
352 | 352 | if (rv != CRYPT_OK) croak("FATAL: hash_memory failed: %s", error_to_string(rv)); |
29 | 29 | { |
30 | 30 | int rv; |
31 | 31 | /* setup dp structure */ |
32 | rv = _ecc_set_curve_from_SV(&self->key, curve); /* croaks on error */ | |
32 | rv = cryptx_internal_ecc_set_curve_from_SV(&self->key, curve); /* croaks on error */ | |
33 | 33 | if (rv != CRYPT_OK) croak("FATAL: ecc_set_curve failed: %s", error_to_string(rv)); |
34 | 34 | /* gen the key */ |
35 | 35 | rv = ecc_generate_key(&self->pstate, self->pindex, &self->key); |
111 | 111 | data = (unsigned char *)SvPVbyte(key_data, data_len); |
112 | 112 | if (self->key.type != -1) { ecc_free(&self->key); self->key.type = -1; } |
113 | 113 | /* setup dp structure */ |
114 | rv = _ecc_set_curve_from_SV(&self->key, curve); /* croaks on error */ | |
114 | rv = cryptx_internal_ecc_set_curve_from_SV(&self->key, curve); /* croaks on error */ | |
115 | 115 | if (rv != CRYPT_OK) croak("FATAL: ecc_set_curve failed: %s", error_to_string(rv)); |
116 | 116 | /* import key */ |
117 | 117 | type = (data_len == (STRLEN)ecc_get_size(&self->key)) ? PK_PRIVATE : PK_PUBLIC; |
153 | 153 | croak("FATAL: key2hash failed - 'k' too big number"); |
154 | 154 | } |
155 | 155 | if (siz>0) { |
156 | mp_tohex_with_leading_zero(self->key.k, buf, 20000, esize*2); | |
156 | cryptx_internal_mp2hex_with_leading_zero(self->key.k, buf, 20000, esize*2); | |
157 | 157 | not_used = hv_store(rv_hash, "k", 1, newSVpv(buf, strlen(buf)), 0); |
158 | 158 | } |
159 | 159 | else{ |
165 | 165 | croak("FATAL: key2hash failed - 'pub_x' too big number"); |
166 | 166 | } |
167 | 167 | if (siz>0) { |
168 | mp_tohex_with_leading_zero(self->key.pubkey.x, buf, 20000, esize*2); | |
168 | cryptx_internal_mp2hex_with_leading_zero(self->key.pubkey.x, buf, 20000, esize*2); | |
169 | 169 | not_used = hv_store(rv_hash, "pub_x", 5, newSVpv(buf, strlen(buf)), 0); |
170 | 170 | } |
171 | 171 | else{ |
177 | 177 | croak("FATAL: key2hash failed - 'pub_y' too big number"); |
178 | 178 | } |
179 | 179 | if (siz>0) { |
180 | mp_tohex_with_leading_zero(self->key.pubkey.y, buf, 20000, esize*2); | |
180 | cryptx_internal_mp2hex_with_leading_zero(self->key.pubkey.y, buf, 20000, esize*2); | |
181 | 181 | not_used = hv_store(rv_hash, "pub_y", 5, newSVpv(buf, strlen(buf)), 0); |
182 | 182 | } |
183 | 183 | else{ |
186 | 186 | /* curve_... */ |
187 | 187 | { |
188 | 188 | not_used = hv_store(rv_hash, "curve_cofactor", 14, newSViv(self->key.dp.cofactor), 0); |
189 | mp_tohex_with_leading_zero(self->key.dp.prime, buf, 20000, 0); | |
189 | cryptx_internal_mp2hex_with_leading_zero(self->key.dp.prime, buf, 20000, 0); | |
190 | 190 | not_used = hv_store(rv_hash, "curve_prime", 11, newSVpv(buf, strlen(buf)), 0); |
191 | mp_tohex_with_leading_zero(self->key.dp.A, buf, 20000, 0); | |
191 | cryptx_internal_mp2hex_with_leading_zero(self->key.dp.A, buf, 20000, 0); | |
192 | 192 | not_used = hv_store(rv_hash, "curve_A", 7, newSVpv(buf, strlen(buf)), 0); |
193 | mp_tohex_with_leading_zero(self->key.dp.B, buf, 20000, 0); | |
193 | cryptx_internal_mp2hex_with_leading_zero(self->key.dp.B, buf, 20000, 0); | |
194 | 194 | not_used = hv_store(rv_hash, "curve_B", 7, newSVpv(buf, strlen(buf)), 0); |
195 | mp_tohex_with_leading_zero(self->key.dp.order, buf, 20000, 0); | |
195 | cryptx_internal_mp2hex_with_leading_zero(self->key.dp.order, buf, 20000, 0); | |
196 | 196 | not_used = hv_store(rv_hash, "curve_order", 11, newSVpv(buf, strlen(buf)), 0); |
197 | mp_tohex_with_leading_zero(self->key.dp.base.x, buf, 20000, 0); | |
197 | cryptx_internal_mp2hex_with_leading_zero(self->key.dp.base.x, buf, 20000, 0); | |
198 | 198 | not_used = hv_store(rv_hash, "curve_Gx", 8, newSVpv(buf, strlen(buf)), 0); |
199 | mp_tohex_with_leading_zero(self->key.dp.base.y, buf, 20000, 0); | |
199 | cryptx_internal_mp2hex_with_leading_zero(self->key.dp.base.y, buf, 20000, 0); | |
200 | 200 | not_used = hv_store(rv_hash, "curve_Gy", 8, newSVpv(buf, strlen(buf)), 0); |
201 | 201 | not_used = hv_store(rv_hash, "curve_bytes", 11, newSViv(mp_unsigned_bin_size(self->key.dp.prime)), 0); |
202 | 202 | not_used = hv_store(rv_hash, "curve_bits", 10, newSViv(mp_count_bits(self->key.dp.prime)), 0); |
325 | 325 | |
326 | 326 | data_ptr = (unsigned char *)SvPVbyte(data, data_len); |
327 | 327 | |
328 | hash_id = _find_hash(hash_name); | |
328 | hash_id = cryptx_internal_find_hash(hash_name); | |
329 | 329 | if (hash_id == -1) croak("FATAL: find_hash failed for '%s'", hash_name); |
330 | 330 | rv = ecc_encrypt_key(data_ptr, (unsigned long)data_len, buffer, &buffer_len, |
331 | 331 | &self->pstate, self->pindex, |
370 | 370 | |
371 | 371 | data_ptr = (unsigned char *)SvPVbyte(data, data_len); |
372 | 372 | if (ix == 1 || ix == 2) { |
373 | id = _find_hash(hash_name); | |
373 | id = cryptx_internal_find_hash(hash_name); | |
374 | 374 | if (id == -1) croak("FATAL: find_hash failed for '%s'", hash_name); |
375 | 375 | rv = hash_memory(id, data_ptr, (unsigned long)data_len, tmp, &tmp_len); |
376 | 376 | if (rv != CRYPT_OK) croak("FATAL: hash_memory failed: %s", error_to_string(rv)); |
409 | 409 | data_ptr = (unsigned char *)SvPVbyte(data, data_len); |
410 | 410 | sig_ptr = (unsigned char *)SvPVbyte(sig, sig_len); |
411 | 411 | if (ix == 1 || ix == 2) { |
412 | id = _find_hash(hash_name); | |
412 | id = cryptx_internal_find_hash(hash_name); | |
413 | 413 | if (id == -1) croak("FATAL: find_hash failed for '%s'", hash_name); |
414 | 414 | rv = hash_memory(id, data_ptr, (unsigned long)data_len, tmp, &tmp_len); |
415 | 415 | if (rv != CRYPT_OK) croak("FATAL: hash_memory failed: %s", error_to_string(rv)); |
168 | 168 | croak("FATAL: key2hash failed - 'e' too big number"); |
169 | 169 | } |
170 | 170 | if (siz>0) { |
171 | mp_tohex_with_leading_zero(self->key.e, buf, 20000, 0); | |
171 | cryptx_internal_mp2hex_with_leading_zero(self->key.e, buf, 20000, 0); | |
172 | 172 | not_used = hv_store(rv_hash, "e", 1, newSVpv(buf, strlen(buf)), 0); |
173 | 173 | } |
174 | 174 | else{ |
180 | 180 | croak("FATAL: key2hash failed - 'd' too big number"); |
181 | 181 | } |
182 | 182 | if (siz>0) { |
183 | mp_tohex_with_leading_zero(self->key.d, buf, 20000, 0); | |
183 | cryptx_internal_mp2hex_with_leading_zero(self->key.d, buf, 20000, 0); | |
184 | 184 | not_used = hv_store(rv_hash, "d", 1, newSVpv(buf, strlen(buf)), 0); |
185 | 185 | } |
186 | 186 | else{ |
192 | 192 | croak("FATAL: key2hash failed - 'N' too big number"); |
193 | 193 | } |
194 | 194 | if (siz>0) { |
195 | mp_tohex_with_leading_zero(self->key.N, buf, 20000, 0); | |
195 | cryptx_internal_mp2hex_with_leading_zero(self->key.N, buf, 20000, 0); | |
196 | 196 | not_used = hv_store(rv_hash, "N", 1, newSVpv(buf, strlen(buf)), 0); |
197 | 197 | } |
198 | 198 | else{ |
204 | 204 | croak("FATAL: key2hash failed - 'q' too big number"); |
205 | 205 | } |
206 | 206 | if (siz>0) { |
207 | mp_tohex_with_leading_zero(self->key.q, buf, 20000, 0); | |
207 | cryptx_internal_mp2hex_with_leading_zero(self->key.q, buf, 20000, 0); | |
208 | 208 | not_used = hv_store(rv_hash, "q", 1, newSVpv(buf, strlen(buf)), 0); |
209 | 209 | } |
210 | 210 | else{ |
216 | 216 | croak("FATAL: key2hash failed - 'p' too big number"); |
217 | 217 | } |
218 | 218 | if (siz>0) { |
219 | mp_tohex_with_leading_zero(self->key.p, buf, 20000, 0); | |
219 | cryptx_internal_mp2hex_with_leading_zero(self->key.p, buf, 20000, 0); | |
220 | 220 | not_used = hv_store(rv_hash, "p", 1, newSVpv(buf, strlen(buf)), 0); |
221 | 221 | } |
222 | 222 | else{ |
228 | 228 | croak("FATAL: key2hash failed - 'qP' too big number"); |
229 | 229 | } |
230 | 230 | if (siz>0) { |
231 | mp_tohex_with_leading_zero(self->key.qP, buf, 20000, 0); | |
231 | cryptx_internal_mp2hex_with_leading_zero(self->key.qP, buf, 20000, 0); | |
232 | 232 | not_used = hv_store(rv_hash, "qP", 2, newSVpv(buf, strlen(buf)), 0); |
233 | 233 | } |
234 | 234 | else{ |
240 | 240 | croak("FATAL: key2hash failed - 'dP' too big number"); |
241 | 241 | } |
242 | 242 | if (siz>0) { |
243 | mp_tohex_with_leading_zero(self->key.dP, buf, 20000, 0); | |
243 | cryptx_internal_mp2hex_with_leading_zero(self->key.dP, buf, 20000, 0); | |
244 | 244 | not_used = hv_store(rv_hash, "dP", 2, newSVpv(buf, strlen(buf)), 0); |
245 | 245 | } |
246 | 246 | else{ |
252 | 252 | croak("FATAL: key2hash failed - 'dQ' too big number"); |
253 | 253 | } |
254 | 254 | if (siz>0) { |
255 | mp_tohex_with_leading_zero(self->key.dQ, buf, 20000, 0); | |
255 | cryptx_internal_mp2hex_with_leading_zero(self->key.dQ, buf, 20000, 0); | |
256 | 256 | not_used = hv_store(rv_hash, "dQ", 2, newSVpv(buf, strlen(buf)), 0); |
257 | 257 | } |
258 | 258 | else{ |
309 | 309 | |
310 | 310 | RETVAL = newSVpvn(NULL, 0); /* undef */ |
311 | 311 | if (strnEQ(padding, "oaep", 4)) { |
312 | hash_id = _find_hash(oaep_hash); | |
312 | hash_id = cryptx_internal_find_hash(oaep_hash); | |
313 | 313 | if (hash_id == -1) croak("FATAL: find_hash failed for '%s'", oaep_hash); |
314 | 314 | if (oaep_lparam) lparam_ptr = (unsigned char *)SvPVbyte(oaep_lparam, lparam_len); |
315 | 315 | rv = rsa_encrypt_key_ex(data_ptr, (unsigned long)data_len, buffer, &buffer_len, lparam_ptr, (unsigned long)lparam_len, |
354 | 354 | |
355 | 355 | RETVAL = newSVpvn(NULL, 0); /* undef */ |
356 | 356 | if (strnEQ(padding, "oaep", 4)) { |
357 | hash_id = _find_hash(oaep_hash); | |
357 | hash_id = cryptx_internal_find_hash(oaep_hash); | |
358 | 358 | if (hash_id == -1) croak("FATAL: find_hash failed for '%s'", oaep_hash); |
359 | 359 | if (oaep_lparam) lparam_ptr = (unsigned char *)SvPVbyte(oaep_lparam, lparam_len); |
360 | 360 | rv = rsa_decrypt_key_ex(data_ptr, (unsigned long)data_len, buffer, &buffer_len, lparam_ptr, (unsigned long)lparam_len, |
396 | 396 | |
397 | 397 | data_ptr = (unsigned char *)SvPVbyte(data, data_len); |
398 | 398 | if (ix == 1) { |
399 | hash_id = _find_hash(hash_name); | |
399 | hash_id = cryptx_internal_find_hash(hash_name); | |
400 | 400 | if (hash_id == -1) croak("FATAL: find_hash failed for '%s'", hash_name); |
401 | 401 | rv = hash_memory(hash_id, data_ptr, (unsigned long)data_len, tmp, &tmp_len); |
402 | 402 | if (rv != CRYPT_OK) croak("FATAL: hash_memory failed: %s", error_to_string(rv)); |
404 | 404 | data_len = tmp_len; |
405 | 405 | } |
406 | 406 | if (strnEQ(padding, "pss", 3)) { |
407 | hash_id = _find_hash(hash_name); | |
407 | hash_id = cryptx_internal_find_hash(hash_name); | |
408 | 408 | if (hash_id == -1) croak("FATAL: find_hash failed for '%s'", hash_name); |
409 | 409 | rv = rsa_sign_hash_ex(data_ptr, (unsigned long)data_len, buffer, &buffer_len, LTC_PKCS_1_PSS, |
410 | 410 | &self->pstate, self->pindex, |
413 | 413 | RETVAL = newSVpvn((char*)buffer, buffer_len); |
414 | 414 | } |
415 | 415 | else if (strnEQ(padding, "v1.5", 4)) { |
416 | hash_id = _find_hash(hash_name); | |
416 | hash_id = cryptx_internal_find_hash(hash_name); | |
417 | 417 | if (hash_id == -1) croak("FATAL: find_hash failed for '%s'", hash_name); |
418 | 418 | rv = rsa_sign_hash_ex(data_ptr, (unsigned long)data_len, buffer, &buffer_len, LTC_PKCS_1_V1_5, |
419 | 419 | &self->pstate, self->pindex, |
448 | 448 | data_ptr = (unsigned char *)SvPVbyte(data, data_len); |
449 | 449 | sig_ptr = (unsigned char *)SvPVbyte(sig, sig_len); |
450 | 450 | if (ix == 1) { |
451 | hash_id = _find_hash(hash_name); | |
451 | hash_id = cryptx_internal_find_hash(hash_name); | |
452 | 452 | if (hash_id == -1) croak("FATAL: find_hash failed for '%s'", hash_name); |
453 | 453 | rv = hash_memory(hash_id, data_ptr, (unsigned long)data_len, tmp, &tmp_len); |
454 | 454 | if (rv != CRYPT_OK) croak("FATAL: hash_memory failed: %s", error_to_string(rv)); |
458 | 458 | RETVAL = 1; |
459 | 459 | stat = 0; |
460 | 460 | if (strnEQ(padding, "pss", 3)) { |
461 | hash_id = _find_hash(hash_name); | |
461 | hash_id = cryptx_internal_find_hash(hash_name); | |
462 | 462 | if (hash_id == -1) croak("FATAL: find_hash failed for '%s'", hash_name); |
463 | 463 | rv = rsa_verify_hash_ex(sig_ptr, (unsigned long)sig_len, data_ptr, (unsigned long)data_len, LTC_PKCS_1_PSS, |
464 | 464 | hash_id, saltlen, &stat, &self->key); |
465 | 465 | if (rv != CRYPT_OK || stat != 1) RETVAL = 0; |
466 | 466 | } |
467 | 467 | else if (strnEQ(padding, "v1.5", 4)) { |
468 | hash_id = _find_hash(hash_name); | |
468 | hash_id = cryptx_internal_find_hash(hash_name); | |
469 | 469 | if (hash_id == -1) croak("FATAL: find_hash failed for '%s'", hash_name); |
470 | 470 | rv = rsa_verify_hash_ex(sig_ptr, (unsigned long)sig_len, data_ptr, (unsigned long)data_len, LTC_PKCS_1_V1_5, |
471 | 471 | hash_id, 0, &stat, &self->key); |
24 | 24 | Newz(0, RETVAL, 1, struct prng_struct); |
25 | 25 | if (!RETVAL) croak("FATAL: Newz failed"); |
26 | 26 | |
27 | id = _find_prng(prng_name); | |
27 | id = cryptx_internal_find_prng(prng_name); | |
28 | 28 | if (id == -1) { |
29 | 29 | Safefree(RETVAL); |
30 | 30 | croak("FATAL: find_prng failed for '%s'", prng_name); |
1 | 1 | |
2 | 2 | use strict; |
3 | 3 | use warnings; |
4 | our $VERSION = '0.075'; | |
4 | our $VERSION = '0.076'; | |
5 | 5 | |
6 | 6 | require Exporter; our @ISA = qw(Exporter); ### use Exporter 5.57 'import'; |
7 | 7 | our %EXPORT_TAGS = ( all => [qw( ccm_encrypt_authenticate ccm_decrypt_verify )] ); |
1 | 1 | |
2 | 2 | use strict; |
3 | 3 | use warnings; |
4 | our $VERSION = '0.075'; | |
4 | our $VERSION = '0.076'; | |
5 | 5 | |
6 | 6 | require Exporter; our @ISA = qw(Exporter); ### use Exporter 5.57 'import'; |
7 | 7 | our %EXPORT_TAGS = ( all => [qw( chacha20poly1305_encrypt_authenticate chacha20poly1305_decrypt_verify )] ); |
1 | 1 | |
2 | 2 | use strict; |
3 | 3 | use warnings; |
4 | our $VERSION = '0.075'; | |
4 | our $VERSION = '0.076'; | |
5 | 5 | |
6 | 6 | require Exporter; our @ISA = qw(Exporter); ### use Exporter 5.57 'import'; |
7 | 7 | our %EXPORT_TAGS = ( all => [qw( eax_encrypt_authenticate eax_decrypt_verify )] ); |
1 | 1 | |
2 | 2 | use strict; |
3 | 3 | use warnings; |
4 | our $VERSION = '0.075'; | |
4 | our $VERSION = '0.076'; | |
5 | 5 | |
6 | 6 | require Exporter; our @ISA = qw(Exporter); ### use Exporter 5.57 'import'; |
7 | 7 | our %EXPORT_TAGS = ( all => [qw( gcm_encrypt_authenticate gcm_decrypt_verify )] ); |
1 | 1 | |
2 | 2 | use strict; |
3 | 3 | use warnings; |
4 | our $VERSION = '0.075'; | |
4 | our $VERSION = '0.076'; | |
5 | 5 | |
6 | 6 | require Exporter; our @ISA = qw(Exporter); ### use Exporter 5.57 'import'; |
7 | 7 | our %EXPORT_TAGS = ( all => [qw( ocb_encrypt_authenticate ocb_decrypt_verify )] ); |
1 | 1 | |
2 | 2 | use strict; |
3 | 3 | use warnings; |
4 | our $VERSION = '0.075'; | |
4 | our $VERSION = '0.076'; | |
5 | 5 | |
6 | 6 | ### not used |
7 | 7 |
1 | 1 | |
2 | 2 | use strict; |
3 | 3 | use warnings; |
4 | our $VERSION = '0.075'; | |
4 | our $VERSION = '0.076'; | |
5 | 5 | |
6 | 6 | use base qw(Crypt::Checksum Exporter); |
7 | 7 | our %EXPORT_TAGS = ( all => [qw( adler32_data adler32_data_hex adler32_data_int adler32_file adler32_file_hex adler32_file_int )] ); |
1 | 1 | |
2 | 2 | use strict; |
3 | 3 | use warnings; |
4 | our $VERSION = '0.075'; | |
4 | our $VERSION = '0.076'; | |
5 | 5 | |
6 | 6 | use base qw(Crypt::Checksum Exporter); |
7 | 7 | our %EXPORT_TAGS = ( all => [qw( crc32_data crc32_data_hex crc32_data_int crc32_file crc32_file_hex crc32_file_int )] ); |
1 | 1 | |
2 | 2 | use strict; |
3 | 3 | use warnings; |
4 | our $VERSION = '0.075'; | |
4 | our $VERSION = '0.076'; | |
5 | 5 | |
6 | 6 | require Exporter; our @ISA = qw(Exporter); ### use Exporter 5.57 'import'; |
7 | 7 | our %EXPORT_TAGS = ( all => [qw/ adler32_data adler32_data_hex adler32_data_int adler32_file adler32_file_hex adler32_file_int |
3 | 3 | |
4 | 4 | use strict; |
5 | 5 | use warnings; |
6 | our $VERSION = '0.075'; | |
6 | our $VERSION = '0.076'; | |
7 | 7 | |
8 | 8 | use base qw(Crypt::Cipher); |
9 | 9 |
3 | 3 | |
4 | 4 | use strict; |
5 | 5 | use warnings; |
6 | our $VERSION = '0.075'; | |
6 | our $VERSION = '0.076'; | |
7 | 7 | |
8 | 8 | use base qw(Crypt::Cipher); |
9 | 9 |
3 | 3 | |
4 | 4 | use strict; |
5 | 5 | use warnings; |
6 | our $VERSION = '0.075'; | |
6 | our $VERSION = '0.076'; | |
7 | 7 | |
8 | 8 | use base qw(Crypt::Cipher); |
9 | 9 |
3 | 3 | |
4 | 4 | use strict; |
5 | 5 | use warnings; |
6 | our $VERSION = '0.075'; | |
6 | our $VERSION = '0.076'; | |
7 | 7 | |
8 | 8 | use base qw(Crypt::Cipher); |
9 | 9 |
3 | 3 | |
4 | 4 | use strict; |
5 | 5 | use warnings; |
6 | our $VERSION = '0.075'; | |
6 | our $VERSION = '0.076'; | |
7 | 7 | |
8 | 8 | use base qw(Crypt::Cipher); |
9 | 9 |
3 | 3 | |
4 | 4 | use strict; |
5 | 5 | use warnings; |
6 | our $VERSION = '0.075'; | |
6 | our $VERSION = '0.076'; | |
7 | 7 | |
8 | 8 | use base qw(Crypt::Cipher); |
9 | 9 |
3 | 3 | |
4 | 4 | use strict; |
5 | 5 | use warnings; |
6 | our $VERSION = '0.075'; | |
6 | our $VERSION = '0.076'; | |
7 | 7 | |
8 | 8 | use base qw(Crypt::Cipher); |
9 | 9 |
3 | 3 | |
4 | 4 | use strict; |
5 | 5 | use warnings; |
6 | our $VERSION = '0.075'; | |
6 | our $VERSION = '0.076'; | |
7 | 7 | |
8 | 8 | use base qw(Crypt::Cipher); |
9 | 9 |
3 | 3 | |
4 | 4 | use strict; |
5 | 5 | use warnings; |
6 | our $VERSION = '0.075'; | |
6 | our $VERSION = '0.076'; | |
7 | 7 | |
8 | 8 | use base qw(Crypt::Cipher); |
9 | 9 |
3 | 3 | |
4 | 4 | use strict; |
5 | 5 | use warnings; |
6 | our $VERSION = '0.075'; | |
6 | our $VERSION = '0.076'; | |
7 | 7 | |
8 | 8 | use base qw(Crypt::Cipher); |
9 | 9 |
3 | 3 | |
4 | 4 | use strict; |
5 | 5 | use warnings; |
6 | our $VERSION = '0.075'; | |
6 | our $VERSION = '0.076'; | |
7 | 7 | |
8 | 8 | use base qw(Crypt::Cipher); |
9 | 9 |
3 | 3 | |
4 | 4 | use strict; |
5 | 5 | use warnings; |
6 | our $VERSION = '0.075'; | |
6 | our $VERSION = '0.076'; | |
7 | 7 | |
8 | 8 | use base qw(Crypt::Cipher); |
9 | 9 |
3 | 3 | |
4 | 4 | use strict; |
5 | 5 | use warnings; |
6 | our $VERSION = '0.075'; | |
6 | our $VERSION = '0.076'; | |
7 | 7 | |
8 | 8 | use base qw(Crypt::Cipher); |
9 | 9 |
3 | 3 | |
4 | 4 | use strict; |
5 | 5 | use warnings; |
6 | our $VERSION = '0.075'; | |
6 | our $VERSION = '0.076'; | |
7 | 7 | |
8 | 8 | use base qw(Crypt::Cipher); |
9 | 9 |
3 | 3 | |
4 | 4 | use strict; |
5 | 5 | use warnings; |
6 | our $VERSION = '0.075'; | |
6 | our $VERSION = '0.076'; | |
7 | 7 | |
8 | 8 | use base qw(Crypt::Cipher); |
9 | 9 |
3 | 3 | |
4 | 4 | use strict; |
5 | 5 | use warnings; |
6 | our $VERSION = '0.075'; | |
6 | our $VERSION = '0.076'; | |
7 | 7 | |
8 | 8 | use base qw(Crypt::Cipher); |
9 | 9 |
3 | 3 | |
4 | 4 | use strict; |
5 | 5 | use warnings; |
6 | our $VERSION = '0.075'; | |
6 | our $VERSION = '0.076'; | |
7 | 7 | |
8 | 8 | use base qw(Crypt::Cipher); |
9 | 9 |
3 | 3 | |
4 | 4 | use strict; |
5 | 5 | use warnings; |
6 | our $VERSION = '0.075'; | |
6 | our $VERSION = '0.076'; | |
7 | 7 | |
8 | 8 | use base qw(Crypt::Cipher); |
9 | 9 |
3 | 3 | |
4 | 4 | use strict; |
5 | 5 | use warnings; |
6 | our $VERSION = '0.075'; | |
6 | our $VERSION = '0.076'; | |
7 | 7 | |
8 | 8 | use base qw(Crypt::Cipher); |
9 | 9 |
3 | 3 | |
4 | 4 | use strict; |
5 | 5 | use warnings; |
6 | our $VERSION = '0.075'; | |
6 | our $VERSION = '0.076'; | |
7 | 7 | |
8 | 8 | use base qw(Crypt::Cipher); |
9 | 9 |
3 | 3 | |
4 | 4 | use strict; |
5 | 5 | use warnings; |
6 | our $VERSION = '0.075'; | |
6 | our $VERSION = '0.076'; | |
7 | 7 | |
8 | 8 | use base qw(Crypt::Cipher); |
9 | 9 |
3 | 3 | |
4 | 4 | use strict; |
5 | 5 | use warnings; |
6 | our $VERSION = '0.075'; | |
6 | our $VERSION = '0.076'; | |
7 | 7 | |
8 | 8 | use base qw(Crypt::Cipher); |
9 | 9 |
3 | 3 | |
4 | 4 | use strict; |
5 | 5 | use warnings; |
6 | our $VERSION = '0.075'; | |
6 | our $VERSION = '0.076'; | |
7 | 7 | |
8 | 8 | use base qw(Crypt::Cipher); |
9 | 9 |
3 | 3 | |
4 | 4 | use strict; |
5 | 5 | use warnings; |
6 | our $VERSION = '0.075'; | |
6 | our $VERSION = '0.076'; | |
7 | 7 | |
8 | 8 | use base qw(Crypt::Cipher); |
9 | 9 |
3 | 3 | |
4 | 4 | use strict; |
5 | 5 | use warnings; |
6 | our $VERSION = '0.075'; | |
6 | our $VERSION = '0.076'; | |
7 | 7 | |
8 | 8 | use base qw(Crypt::Cipher); |
9 | 9 |
1 | 1 | |
2 | 2 | use strict; |
3 | 3 | use warnings; |
4 | our $VERSION = '0.075'; | |
4 | our $VERSION = '0.076'; | |
5 | 5 | |
6 | 6 | use Carp; |
7 | 7 | $Carp::Internal{(__PACKAGE__)}++; |
3 | 3 | |
4 | 4 | use strict; |
5 | 5 | use warnings; |
6 | our $VERSION = '0.075'; | |
6 | our $VERSION = '0.076'; | |
7 | 7 | |
8 | 8 | use base qw(Crypt::Digest Exporter); |
9 | 9 | our %EXPORT_TAGS = ( all => [qw( blake2b_160 blake2b_160_hex blake2b_160_b64 blake2b_160_b64u blake2b_160_file blake2b_160_file_hex blake2b_160_file_b64 blake2b_160_file_b64u )] ); |
3 | 3 | |
4 | 4 | use strict; |
5 | 5 | use warnings; |
6 | our $VERSION = '0.075'; | |
6 | our $VERSION = '0.076'; | |
7 | 7 | |
8 | 8 | use base qw(Crypt::Digest Exporter); |
9 | 9 | our %EXPORT_TAGS = ( all => [qw( blake2b_256 blake2b_256_hex blake2b_256_b64 blake2b_256_b64u blake2b_256_file blake2b_256_file_hex blake2b_256_file_b64 blake2b_256_file_b64u )] ); |
3 | 3 | |
4 | 4 | use strict; |
5 | 5 | use warnings; |
6 | our $VERSION = '0.075'; | |
6 | our $VERSION = '0.076'; | |
7 | 7 | |
8 | 8 | use base qw(Crypt::Digest Exporter); |
9 | 9 | our %EXPORT_TAGS = ( all => [qw( blake2b_384 blake2b_384_hex blake2b_384_b64 blake2b_384_b64u blake2b_384_file blake2b_384_file_hex blake2b_384_file_b64 blake2b_384_file_b64u )] ); |
3 | 3 | |
4 | 4 | use strict; |
5 | 5 | use warnings; |
6 | our $VERSION = '0.075'; | |
6 | our $VERSION = '0.076'; | |
7 | 7 | |
8 | 8 | use base qw(Crypt::Digest Exporter); |
9 | 9 | our %EXPORT_TAGS = ( all => [qw( blake2b_512 blake2b_512_hex blake2b_512_b64 blake2b_512_b64u blake2b_512_file blake2b_512_file_hex blake2b_512_file_b64 blake2b_512_file_b64u )] ); |
3 | 3 | |
4 | 4 | use strict; |
5 | 5 | use warnings; |
6 | our $VERSION = '0.075'; | |
6 | our $VERSION = '0.076'; | |
7 | 7 | |
8 | 8 | use base qw(Crypt::Digest Exporter); |
9 | 9 | our %EXPORT_TAGS = ( all => [qw( blake2s_128 blake2s_128_hex blake2s_128_b64 blake2s_128_b64u blake2s_128_file blake2s_128_file_hex blake2s_128_file_b64 blake2s_128_file_b64u )] ); |
3 | 3 | |
4 | 4 | use strict; |
5 | 5 | use warnings; |
6 | our $VERSION = '0.075'; | |
6 | our $VERSION = '0.076'; | |
7 | 7 | |
8 | 8 | use base qw(Crypt::Digest Exporter); |
9 | 9 | our %EXPORT_TAGS = ( all => [qw( blake2s_160 blake2s_160_hex blake2s_160_b64 blake2s_160_b64u blake2s_160_file blake2s_160_file_hex blake2s_160_file_b64 blake2s_160_file_b64u )] ); |
3 | 3 | |
4 | 4 | use strict; |
5 | 5 | use warnings; |
6 | our $VERSION = '0.075'; | |
6 | our $VERSION = '0.076'; | |
7 | 7 | |
8 | 8 | use base qw(Crypt::Digest Exporter); |
9 | 9 | our %EXPORT_TAGS = ( all => [qw( blake2s_224 blake2s_224_hex blake2s_224_b64 blake2s_224_b64u blake2s_224_file blake2s_224_file_hex blake2s_224_file_b64 blake2s_224_file_b64u )] ); |
3 | 3 | |
4 | 4 | use strict; |
5 | 5 | use warnings; |
6 | our $VERSION = '0.075'; | |
6 | our $VERSION = '0.076'; | |
7 | 7 | |
8 | 8 | use base qw(Crypt::Digest Exporter); |
9 | 9 | our %EXPORT_TAGS = ( all => [qw( blake2s_256 blake2s_256_hex blake2s_256_b64 blake2s_256_b64u blake2s_256_file blake2s_256_file_hex blake2s_256_file_b64 blake2s_256_file_b64u )] ); |
3 | 3 | |
4 | 4 | use strict; |
5 | 5 | use warnings; |
6 | our $VERSION = '0.075'; | |
6 | our $VERSION = '0.076'; | |
7 | 7 | |
8 | 8 | use base qw(Crypt::Digest Exporter); |
9 | 9 | our %EXPORT_TAGS = ( all => [qw( chaes chaes_hex chaes_b64 chaes_b64u chaes_file chaes_file_hex chaes_file_b64 chaes_file_b64u )] ); |
3 | 3 | |
4 | 4 | use strict; |
5 | 5 | use warnings; |
6 | our $VERSION = '0.075'; | |
6 | our $VERSION = '0.076'; | |
7 | 7 | |
8 | 8 | use base qw(Crypt::Digest Exporter); |
9 | 9 | our %EXPORT_TAGS = ( all => [qw( keccak224 keccak224_hex keccak224_b64 keccak224_b64u keccak224_file keccak224_file_hex keccak224_file_b64 keccak224_file_b64u )] ); |
3 | 3 | |
4 | 4 | use strict; |
5 | 5 | use warnings; |
6 | our $VERSION = '0.075'; | |
6 | our $VERSION = '0.076'; | |
7 | 7 | |
8 | 8 | use base qw(Crypt::Digest Exporter); |
9 | 9 | our %EXPORT_TAGS = ( all => [qw( keccak256 keccak256_hex keccak256_b64 keccak256_b64u keccak256_file keccak256_file_hex keccak256_file_b64 keccak256_file_b64u )] ); |
3 | 3 | |
4 | 4 | use strict; |
5 | 5 | use warnings; |
6 | our $VERSION = '0.075'; | |
6 | our $VERSION = '0.076'; | |
7 | 7 | |
8 | 8 | use base qw(Crypt::Digest Exporter); |
9 | 9 | our %EXPORT_TAGS = ( all => [qw( keccak384 keccak384_hex keccak384_b64 keccak384_b64u keccak384_file keccak384_file_hex keccak384_file_b64 keccak384_file_b64u )] ); |
3 | 3 | |
4 | 4 | use strict; |
5 | 5 | use warnings; |
6 | our $VERSION = '0.075'; | |
6 | our $VERSION = '0.076'; | |
7 | 7 | |
8 | 8 | use base qw(Crypt::Digest Exporter); |
9 | 9 | our %EXPORT_TAGS = ( all => [qw( keccak512 keccak512_hex keccak512_b64 keccak512_b64u keccak512_file keccak512_file_hex keccak512_file_b64 keccak512_file_b64u )] ); |
3 | 3 | |
4 | 4 | use strict; |
5 | 5 | use warnings; |
6 | our $VERSION = '0.075'; | |
6 | our $VERSION = '0.076'; | |
7 | 7 | |
8 | 8 | use base qw(Crypt::Digest Exporter); |
9 | 9 | our %EXPORT_TAGS = ( all => [qw( md2 md2_hex md2_b64 md2_b64u md2_file md2_file_hex md2_file_b64 md2_file_b64u )] ); |
3 | 3 | |
4 | 4 | use strict; |
5 | 5 | use warnings; |
6 | our $VERSION = '0.075'; | |
6 | our $VERSION = '0.076'; | |
7 | 7 | |
8 | 8 | use base qw(Crypt::Digest Exporter); |
9 | 9 | our %EXPORT_TAGS = ( all => [qw( md4 md4_hex md4_b64 md4_b64u md4_file md4_file_hex md4_file_b64 md4_file_b64u )] ); |
3 | 3 | |
4 | 4 | use strict; |
5 | 5 | use warnings; |
6 | our $VERSION = '0.075'; | |
6 | our $VERSION = '0.076'; | |
7 | 7 | |
8 | 8 | use base qw(Crypt::Digest Exporter); |
9 | 9 | our %EXPORT_TAGS = ( all => [qw( md5 md5_hex md5_b64 md5_b64u md5_file md5_file_hex md5_file_b64 md5_file_b64u )] ); |
3 | 3 | |
4 | 4 | use strict; |
5 | 5 | use warnings; |
6 | our $VERSION = '0.075'; | |
6 | our $VERSION = '0.076'; | |
7 | 7 | |
8 | 8 | use base qw(Crypt::Digest Exporter); |
9 | 9 | our %EXPORT_TAGS = ( all => [qw( ripemd128 ripemd128_hex ripemd128_b64 ripemd128_b64u ripemd128_file ripemd128_file_hex ripemd128_file_b64 ripemd128_file_b64u )] ); |
3 | 3 | |
4 | 4 | use strict; |
5 | 5 | use warnings; |
6 | our $VERSION = '0.075'; | |
6 | our $VERSION = '0.076'; | |
7 | 7 | |
8 | 8 | use base qw(Crypt::Digest Exporter); |
9 | 9 | our %EXPORT_TAGS = ( all => [qw( ripemd160 ripemd160_hex ripemd160_b64 ripemd160_b64u ripemd160_file ripemd160_file_hex ripemd160_file_b64 ripemd160_file_b64u )] ); |
3 | 3 | |
4 | 4 | use strict; |
5 | 5 | use warnings; |
6 | our $VERSION = '0.075'; | |
6 | our $VERSION = '0.076'; | |
7 | 7 | |
8 | 8 | use base qw(Crypt::Digest Exporter); |
9 | 9 | our %EXPORT_TAGS = ( all => [qw( ripemd256 ripemd256_hex ripemd256_b64 ripemd256_b64u ripemd256_file ripemd256_file_hex ripemd256_file_b64 ripemd256_file_b64u )] ); |
3 | 3 | |
4 | 4 | use strict; |
5 | 5 | use warnings; |
6 | our $VERSION = '0.075'; | |
6 | our $VERSION = '0.076'; | |
7 | 7 | |
8 | 8 | use base qw(Crypt::Digest Exporter); |
9 | 9 | our %EXPORT_TAGS = ( all => [qw( ripemd320 ripemd320_hex ripemd320_b64 ripemd320_b64u ripemd320_file ripemd320_file_hex ripemd320_file_b64 ripemd320_file_b64u )] ); |
3 | 3 | |
4 | 4 | use strict; |
5 | 5 | use warnings; |
6 | our $VERSION = '0.075'; | |
6 | our $VERSION = '0.076'; | |
7 | 7 | |
8 | 8 | use base qw(Crypt::Digest Exporter); |
9 | 9 | our %EXPORT_TAGS = ( all => [qw( sha1 sha1_hex sha1_b64 sha1_b64u sha1_file sha1_file_hex sha1_file_b64 sha1_file_b64u )] ); |
3 | 3 | |
4 | 4 | use strict; |
5 | 5 | use warnings; |
6 | our $VERSION = '0.075'; | |
6 | our $VERSION = '0.076'; | |
7 | 7 | |
8 | 8 | use base qw(Crypt::Digest Exporter); |
9 | 9 | our %EXPORT_TAGS = ( all => [qw( sha224 sha224_hex sha224_b64 sha224_b64u sha224_file sha224_file_hex sha224_file_b64 sha224_file_b64u )] ); |
3 | 3 | |
4 | 4 | use strict; |
5 | 5 | use warnings; |
6 | our $VERSION = '0.075'; | |
6 | our $VERSION = '0.076'; | |
7 | 7 | |
8 | 8 | use base qw(Crypt::Digest Exporter); |
9 | 9 | our %EXPORT_TAGS = ( all => [qw( sha256 sha256_hex sha256_b64 sha256_b64u sha256_file sha256_file_hex sha256_file_b64 sha256_file_b64u )] ); |
3 | 3 | |
4 | 4 | use strict; |
5 | 5 | use warnings; |
6 | our $VERSION = '0.075'; | |
6 | our $VERSION = '0.076'; | |
7 | 7 | |
8 | 8 | use base qw(Crypt::Digest Exporter); |
9 | 9 | our %EXPORT_TAGS = ( all => [qw( sha384 sha384_hex sha384_b64 sha384_b64u sha384_file sha384_file_hex sha384_file_b64 sha384_file_b64u )] ); |
3 | 3 | |
4 | 4 | use strict; |
5 | 5 | use warnings; |
6 | our $VERSION = '0.075'; | |
6 | our $VERSION = '0.076'; | |
7 | 7 | |
8 | 8 | use base qw(Crypt::Digest Exporter); |
9 | 9 | our %EXPORT_TAGS = ( all => [qw( sha3_224 sha3_224_hex sha3_224_b64 sha3_224_b64u sha3_224_file sha3_224_file_hex sha3_224_file_b64 sha3_224_file_b64u )] ); |
3 | 3 | |
4 | 4 | use strict; |
5 | 5 | use warnings; |
6 | our $VERSION = '0.075'; | |
6 | our $VERSION = '0.076'; | |
7 | 7 | |
8 | 8 | use base qw(Crypt::Digest Exporter); |
9 | 9 | our %EXPORT_TAGS = ( all => [qw( sha3_256 sha3_256_hex sha3_256_b64 sha3_256_b64u sha3_256_file sha3_256_file_hex sha3_256_file_b64 sha3_256_file_b64u )] ); |
3 | 3 | |
4 | 4 | use strict; |
5 | 5 | use warnings; |
6 | our $VERSION = '0.075'; | |
6 | our $VERSION = '0.076'; | |
7 | 7 | |
8 | 8 | use base qw(Crypt::Digest Exporter); |
9 | 9 | our %EXPORT_TAGS = ( all => [qw( sha3_384 sha3_384_hex sha3_384_b64 sha3_384_b64u sha3_384_file sha3_384_file_hex sha3_384_file_b64 sha3_384_file_b64u )] ); |
3 | 3 | |
4 | 4 | use strict; |
5 | 5 | use warnings; |
6 | our $VERSION = '0.075'; | |
6 | our $VERSION = '0.076'; | |
7 | 7 | |
8 | 8 | use base qw(Crypt::Digest Exporter); |
9 | 9 | our %EXPORT_TAGS = ( all => [qw( sha3_512 sha3_512_hex sha3_512_b64 sha3_512_b64u sha3_512_file sha3_512_file_hex sha3_512_file_b64 sha3_512_file_b64u )] ); |
3 | 3 | |
4 | 4 | use strict; |
5 | 5 | use warnings; |
6 | our $VERSION = '0.075'; | |
6 | our $VERSION = '0.076'; | |
7 | 7 | |
8 | 8 | use base qw(Crypt::Digest Exporter); |
9 | 9 | our %EXPORT_TAGS = ( all => [qw( sha512 sha512_hex sha512_b64 sha512_b64u sha512_file sha512_file_hex sha512_file_b64 sha512_file_b64u )] ); |
3 | 3 | |
4 | 4 | use strict; |
5 | 5 | use warnings; |
6 | our $VERSION = '0.075'; | |
6 | our $VERSION = '0.076'; | |
7 | 7 | |
8 | 8 | use base qw(Crypt::Digest Exporter); |
9 | 9 | our %EXPORT_TAGS = ( all => [qw( sha512_224 sha512_224_hex sha512_224_b64 sha512_224_b64u sha512_224_file sha512_224_file_hex sha512_224_file_b64 sha512_224_file_b64u )] ); |
3 | 3 | |
4 | 4 | use strict; |
5 | 5 | use warnings; |
6 | our $VERSION = '0.075'; | |
6 | our $VERSION = '0.076'; | |
7 | 7 | |
8 | 8 | use base qw(Crypt::Digest Exporter); |
9 | 9 | our %EXPORT_TAGS = ( all => [qw( sha512_256 sha512_256_hex sha512_256_b64 sha512_256_b64u sha512_256_file sha512_256_file_hex sha512_256_file_b64 sha512_256_file_b64u )] ); |
1 | 1 | |
2 | 2 | use strict; |
3 | 3 | use warnings; |
4 | our $VERSION = '0.075'; | |
4 | our $VERSION = '0.076'; | |
5 | 5 | |
6 | 6 | use Carp; |
7 | 7 | $Carp::Internal{(__PACKAGE__)}++; |
3 | 3 | |
4 | 4 | use strict; |
5 | 5 | use warnings; |
6 | our $VERSION = '0.075'; | |
6 | our $VERSION = '0.076'; | |
7 | 7 | |
8 | 8 | use base qw(Crypt::Digest Exporter); |
9 | 9 | our %EXPORT_TAGS = ( all => [qw( tiger192 tiger192_hex tiger192_b64 tiger192_b64u tiger192_file tiger192_file_hex tiger192_file_b64 tiger192_file_b64u )] ); |
3 | 3 | |
4 | 4 | use strict; |
5 | 5 | use warnings; |
6 | our $VERSION = '0.075'; | |
6 | our $VERSION = '0.076'; | |
7 | 7 | |
8 | 8 | use base qw(Crypt::Digest Exporter); |
9 | 9 | our %EXPORT_TAGS = ( all => [qw( whirlpool whirlpool_hex whirlpool_b64 whirlpool_b64u whirlpool_file whirlpool_file_hex whirlpool_file_b64 whirlpool_file_b64u )] ); |
1 | 1 | |
2 | 2 | use strict; |
3 | 3 | use warnings; |
4 | our $VERSION = '0.075'; | |
4 | our $VERSION = '0.076'; | |
5 | 5 | |
6 | 6 | require Exporter; our @ISA = qw(Exporter); ### use Exporter 5.57 'import'; |
7 | 7 | our %EXPORT_TAGS = ( all => [qw( digest_data digest_data_hex digest_data_b64 digest_data_b64u digest_file digest_file_hex digest_file_b64 digest_file_b64u )] ); |
1 | 1 | |
2 | 2 | use strict; |
3 | 3 | use warnings; |
4 | our $VERSION = '0.075'; | |
4 | our $VERSION = '0.076'; | |
5 | 5 | |
6 | 6 | require Exporter; our @ISA = qw(Exporter); ### use Exporter 5.57 'import'; |
7 | 7 | our %EXPORT_TAGS = ( all => [qw(pbkdf1 pbkdf2 hkdf hkdf_expand hkdf_extract)] ); |
3 | 3 | |
4 | 4 | use strict; |
5 | 5 | use warnings; |
6 | our $VERSION = '0.075'; | |
6 | our $VERSION = '0.076'; | |
7 | 7 | |
8 | 8 | use base qw(Crypt::Mac Exporter); |
9 | 9 | our %EXPORT_TAGS = ( all => [qw( blake2b blake2b_hex blake2b_b64 blake2b_b64u )] ); |
3 | 3 | |
4 | 4 | use strict; |
5 | 5 | use warnings; |
6 | our $VERSION = '0.075'; | |
6 | our $VERSION = '0.076'; | |
7 | 7 | |
8 | 8 | use base qw(Crypt::Mac Exporter); |
9 | 9 | our %EXPORT_TAGS = ( all => [qw( blake2s blake2s_hex blake2s_b64 blake2s_b64u )] ); |
3 | 3 | |
4 | 4 | use strict; |
5 | 5 | use warnings; |
6 | our $VERSION = '0.075'; | |
6 | our $VERSION = '0.076'; | |
7 | 7 | |
8 | 8 | use base qw(Crypt::Mac Exporter); |
9 | 9 | our %EXPORT_TAGS = ( all => [qw( f9 f9_hex f9_b64 f9_b64u )] ); |
3 | 3 | |
4 | 4 | use strict; |
5 | 5 | use warnings; |
6 | our $VERSION = '0.075'; | |
6 | our $VERSION = '0.076'; | |
7 | 7 | |
8 | 8 | use base qw(Crypt::Mac Exporter); |
9 | 9 | our %EXPORT_TAGS = ( all => [qw( hmac hmac_hex hmac_b64 hmac_b64u )] ); |
3 | 3 | |
4 | 4 | use strict; |
5 | 5 | use warnings; |
6 | our $VERSION = '0.075'; | |
6 | our $VERSION = '0.076'; | |
7 | 7 | |
8 | 8 | use base qw(Crypt::Mac Exporter); |
9 | 9 | our %EXPORT_TAGS = ( all => [qw( omac omac_hex omac_b64 omac_b64u )] ); |
3 | 3 | |
4 | 4 | use strict; |
5 | 5 | use warnings; |
6 | our $VERSION = '0.075'; | |
6 | our $VERSION = '0.076'; | |
7 | 7 | |
8 | 8 | use base qw(Crypt::Mac Exporter); |
9 | 9 | our %EXPORT_TAGS = ( all => [qw( pmac pmac_hex pmac_b64 pmac_b64u )] ); |
3 | 3 | |
4 | 4 | use strict; |
5 | 5 | use warnings; |
6 | our $VERSION = '0.075'; | |
6 | our $VERSION = '0.076'; | |
7 | 7 | |
8 | 8 | use base qw(Crypt::Mac Exporter); |
9 | 9 | our %EXPORT_TAGS = ( all => [qw( pelican pelican_hex pelican_b64 pelican_b64u )] ); |
3 | 3 | |
4 | 4 | use strict; |
5 | 5 | use warnings; |
6 | our $VERSION = '0.075'; | |
6 | our $VERSION = '0.076'; | |
7 | 7 | |
8 | 8 | use base qw(Crypt::Mac Exporter); |
9 | 9 | our %EXPORT_TAGS = ( all => [qw( poly1305 poly1305_hex poly1305_b64 poly1305_b64u )] ); |
3 | 3 | |
4 | 4 | use strict; |
5 | 5 | use warnings; |
6 | our $VERSION = '0.075'; | |
6 | our $VERSION = '0.076'; | |
7 | 7 | |
8 | 8 | use base qw(Crypt::Mac Exporter); |
9 | 9 | our %EXPORT_TAGS = ( all => [qw( xcbc xcbc_hex xcbc_b64 xcbc_b64u )] ); |
1 | 1 | |
2 | 2 | use strict; |
3 | 3 | use warnings; |
4 | our $VERSION = '0.075'; | |
4 | our $VERSION = '0.076'; | |
5 | 5 | |
6 | 6 | use Carp; |
7 | 7 | $Carp::Internal{(__PACKAGE__)}++; |
1 | 1 | |
2 | 2 | use strict; |
3 | 3 | use warnings; |
4 | our $VERSION = '0.075'; | |
4 | our $VERSION = '0.076'; | |
5 | 5 | |
6 | 6 | require Exporter; our @ISA = qw(Exporter); ### use Exporter 5.57 'import'; |
7 | 7 | use Carp 'croak'; |
3 | 3 | |
4 | 4 | use strict; |
5 | 5 | use warnings; |
6 | our $VERSION = '0.075'; | |
6 | our $VERSION = '0.076'; | |
7 | 7 | |
8 | 8 | use Crypt::Cipher; |
9 | 9 |
3 | 3 | |
4 | 4 | use strict; |
5 | 5 | use warnings; |
6 | our $VERSION = '0.075'; | |
6 | our $VERSION = '0.076'; | |
7 | 7 | |
8 | 8 | use Crypt::Cipher; |
9 | 9 |
3 | 3 | |
4 | 4 | use strict; |
5 | 5 | use warnings; |
6 | our $VERSION = '0.075'; | |
6 | our $VERSION = '0.076'; | |
7 | 7 | |
8 | 8 | use Crypt::Cipher; |
9 | 9 |
3 | 3 | |
4 | 4 | use strict; |
5 | 5 | use warnings; |
6 | our $VERSION = '0.075'; | |
6 | our $VERSION = '0.076'; | |
7 | 7 | |
8 | 8 | use Crypt::Cipher; |
9 | 9 |
3 | 3 | |
4 | 4 | use strict; |
5 | 5 | use warnings; |
6 | our $VERSION = '0.075'; | |
6 | our $VERSION = '0.076'; | |
7 | 7 | |
8 | 8 | use Crypt::Cipher; |
9 | 9 |
1 | 1 | |
2 | 2 | use strict; |
3 | 3 | use warnings; |
4 | our $VERSION = '0.075'; | |
4 | our $VERSION = '0.076'; | |
5 | 5 | |
6 | 6 | ### not used |
7 | 7 |
1 | 1 | |
2 | 2 | use strict; |
3 | 3 | use warnings; |
4 | our $VERSION = '0.075'; | |
4 | our $VERSION = '0.076'; | |
5 | 5 | |
6 | 6 | require Exporter; our @ISA = qw(Exporter); ### use Exporter 5.57 'import'; |
7 | 7 | our %EXPORT_TAGS = ( all => [qw( dh_shared_secret )] ); |
1 | 1 | |
2 | 2 | use strict; |
3 | 3 | use warnings; |
4 | our $VERSION = '0.075'; | |
4 | our $VERSION = '0.076'; | |
5 | 5 | |
6 | 6 | require Exporter; our @ISA = qw(Exporter); ### use Exporter 5.57 'import'; |
7 | 7 | our %EXPORT_TAGS = ( all => [qw( dsa_encrypt dsa_decrypt dsa_sign_message dsa_verify_message dsa_sign_hash dsa_verify_hash )] ); |
1 | 1 | |
2 | 2 | use strict; |
3 | 3 | use warnings; |
4 | our $VERSION = '0.075'; | |
4 | our $VERSION = '0.076'; | |
5 | 5 | |
6 | 6 | require Exporter; our @ISA = qw(Exporter); ### use Exporter 5.57 'import'; |
7 | 7 | our %EXPORT_TAGS = ( all => [qw( ecc_encrypt ecc_decrypt ecc_sign_message ecc_verify_message ecc_sign_hash ecc_verify_hash ecc_shared_secret )] ); |
683 | 683 | "d":"870MB6gfuTJ4HtUnUvYMyJpr5eUZNP4Bk43bVdj3eAE", |
684 | 684 | } |
685 | 685 | |
686 | B<BEWARE:> For JWK support you need to have L<JSON::PP>, L<JSON::XS> or L<Cpanel::JSON::XS> module. | |
686 | B<BEWARE:> For JWK support you need to have L<JSON> module installed. | |
687 | 687 | |
688 | 688 | =item * EC public keys in JSON Web Key (JWK) format |
689 | 689 | |
694 | 694 | "y":"4Etl6SRW2YiLUrN5vfvVHuhp7x8PxltmWWlbbM4IFyM", |
695 | 695 | } |
696 | 696 | |
697 | B<BEWARE:> For JWK support you need to have L<JSON::PP>, L<JSON::XS> or L<Cpanel::JSON::XS> module. | |
697 | B<BEWARE:> For JWK support you need to have L<JSON> module installed. | |
698 | 698 | |
699 | 699 | =back |
700 | 700 | |
778 | 778 | #or |
779 | 779 | my $jwk_hash = $pk->export_key_jwk('public', 1); |
780 | 780 | |
781 | B<BEWARE:> For JWK support you need to have L<JSON::PP>, L<JSON::XS> or L<Cpanel::JSON::XS> module. | |
781 | B<BEWARE:> For JWK support you need to have L<JSON> module installed. | |
782 | 782 | |
783 | 783 | =head2 export_key_jwk_thumbprint |
784 | 784 |
1 | 1 | |
2 | 2 | use strict; |
3 | 3 | use warnings; |
4 | our $VERSION = '0.075'; | |
4 | our $VERSION = '0.076'; | |
5 | 5 | |
6 | 6 | require Exporter; our @ISA = qw(Exporter); ### use Exporter 5.57 'import'; |
7 | 7 | our %EXPORT_TAGS = ( all => [qw( )] ); |
318 | 318 | "d":"RcEJum_STotn0j77a5LZnNRX4hNxcsDXSf4rWgwULa0", |
319 | 319 | } |
320 | 320 | |
321 | B<BEWARE:> For JWK support you need to have L<JSON::PP>, L<JSON::XS> or L<Cpanel::JSON::XS> module. | |
321 | B<BEWARE:> For JWK support you need to have L<JSON> module installed. | |
322 | 322 | |
323 | 323 | =item * Ed25519 public keys in JSON Web Key (JWK) format |
324 | 324 | |
328 | 328 | "x":"oF0a6lgwrJplzfs4RmDUl-NpfEa0Gc8s7IXei9JFRZ0", |
329 | 329 | } |
330 | 330 | |
331 | B<BEWARE:> For JWK support you need to have L<JSON::PP>, L<JSON::XS> or L<Cpanel::JSON::XS> module. | |
331 | B<BEWARE:> For JWK support you need to have L<JSON> module installed. | |
332 | 332 | |
333 | 333 | =back |
334 | 334 | |
381 | 381 | #or |
382 | 382 | my $jwk_hash = $pk->export_key_jwk('public', 1); |
383 | 383 | |
384 | B<BEWARE:> For JWK support you need to have L<JSON::PP>, L<JSON::XS> or L<Cpanel::JSON::XS> module. | |
384 | B<BEWARE:> For JWK support you need to have L<JSON> module installed. | |
385 | 385 | |
386 | 386 | =head2 export_key_raw |
387 | 387 |
1 | 1 | |
2 | 2 | use strict; |
3 | 3 | use warnings; |
4 | our $VERSION = '0.075'; | |
4 | our $VERSION = '0.076'; | |
5 | 5 | |
6 | 6 | require Exporter; our @ISA = qw(Exporter); ### use Exporter 5.57 'import'; |
7 | 7 | our %EXPORT_TAGS = ( all => [qw(rsa_encrypt rsa_decrypt rsa_sign_message rsa_verify_message rsa_sign_hash rsa_verify_hash)] ); |
488 | 488 | "qi":"GyM_p6JrXySiz1toFgKbWV...4ypu9bMWx3QJBfm0FoYzUIZEVEcOqwmRN81oDAaaBk0KWGDjJHDdDmFW3AN7I-pux_mHZG", |
489 | 489 | } |
490 | 490 | |
491 | B<BEWARE:> For JWK support you need to have L<JSON::PP>, L<JSON::XS> or L<Cpanel::JSON::XS> module. | |
491 | B<BEWARE:> For JWK support you need to have L<JSON> module installed. | |
492 | 492 | |
493 | 493 | =item * RSA public keys in JSON Web Key (JWK) format |
494 | 494 | |
498 | 498 | "e":"AQAB", |
499 | 499 | } |
500 | 500 | |
501 | B<BEWARE:> For JWK support you need to have L<JSON::PP>, L<JSON::XS> or L<Cpanel::JSON::XS> module. | |
501 | B<BEWARE:> For JWK support you need to have L<JSON> module installed. | |
502 | 502 | |
503 | 503 | =back |
504 | 504 | |
558 | 558 | #or |
559 | 559 | my $jwk_hash = $pk->export_key_jwk('public', 1); |
560 | 560 | |
561 | B<BEWARE:> For JWK support you need to have L<JSON::PP>, L<JSON::XS> or L<Cpanel::JSON::XS> module. | |
561 | B<BEWARE:> For JWK support you need to have L<JSON> module installed. | |
562 | 562 | |
563 | 563 | =head2 export_key_jwk_thumbprint |
564 | 564 |
1 | 1 | |
2 | 2 | use strict; |
3 | 3 | use warnings; |
4 | our $VERSION = '0.075'; | |
4 | our $VERSION = '0.076'; | |
5 | 5 | |
6 | 6 | require Exporter; our @ISA = qw(Exporter); ### use Exporter 5.57 'import'; |
7 | 7 | our %EXPORT_TAGS = ( all => [qw( )] ); |
272 | 272 | "d":"AC-T0Qulco2N2OlSdyHaujJhwLsb7957S72sYx1FRlE", |
273 | 273 | } |
274 | 274 | |
275 | B<BEWARE:> For JWK support you need to have L<JSON::PP>, L<JSON::XS> or L<Cpanel::JSON::XS> module. | |
275 | B<BEWARE:> For JWK support you need to have L<JSON> module installed. | |
276 | 276 | |
277 | 277 | =item * X25519 public keys in JSON Web Key (JWK) format |
278 | 278 | |
282 | 282 | "x":"6ngG9yGoVwUSyPbvtOjWIMSaUp5N9eqnfexkb7HofkE", |
283 | 283 | } |
284 | 284 | |
285 | B<BEWARE:> For JWK support you need to have L<JSON::PP>, L<JSON::XS> or L<Cpanel::JSON::XS> module. | |
285 | B<BEWARE:> For JWK support you need to have L<JSON> module installed. | |
286 | 286 | |
287 | 287 | =back |
288 | 288 | |
335 | 335 | #or |
336 | 336 | my $jwk_hash = $pk->export_key_jwk('public', 1); |
337 | 337 | |
338 | B<BEWARE:> For JWK support you need to have L<JSON::PP>, L<JSON::XS> or L<Cpanel::JSON::XS> module. | |
338 | B<BEWARE:> For JWK support you need to have L<JSON> module installed. | |
339 | 339 | |
340 | 340 | =head2 export_key_raw |
341 | 341 |
1 | 1 | |
2 | 2 | use strict; |
3 | 3 | use warnings; |
4 | our $VERSION = '0.075'; | |
4 | our $VERSION = '0.076'; | |
5 | 5 | |
6 | 6 | use Carp; |
7 | 7 |
1 | 1 | |
2 | 2 | use strict; |
3 | 3 | use warnings; |
4 | our $VERSION = '0.075'; | |
4 | our $VERSION = '0.076'; | |
5 | 5 | |
6 | 6 | use base qw(Crypt::PRNG Exporter); |
7 | 7 | our %EXPORT_TAGS = ( all => [qw(random_bytes random_bytes_hex random_bytes_b64 random_bytes_b64u random_string random_string_from rand irand)] ); |
1 | 1 | |
2 | 2 | use strict; |
3 | 3 | use warnings; |
4 | our $VERSION = '0.075'; | |
4 | our $VERSION = '0.076'; | |
5 | 5 | |
6 | 6 | use base qw(Crypt::PRNG Exporter); |
7 | 7 | our %EXPORT_TAGS = ( all => [qw(random_bytes random_bytes_hex random_bytes_b64 random_bytes_b64u random_string random_string_from rand irand)] ); |
1 | 1 | |
2 | 2 | use strict; |
3 | 3 | use warnings; |
4 | our $VERSION = '0.075'; | |
4 | our $VERSION = '0.076'; | |
5 | 5 | |
6 | 6 | use base qw(Crypt::PRNG Exporter); |
7 | 7 | our %EXPORT_TAGS = ( all => [qw(random_bytes random_bytes_hex random_bytes_b64 random_bytes_b64u random_string random_string_from rand irand)] ); |
1 | 1 | |
2 | 2 | use strict; |
3 | 3 | use warnings; |
4 | our $VERSION = '0.075'; | |
4 | our $VERSION = '0.076'; | |
5 | 5 | |
6 | 6 | use base qw(Crypt::PRNG Exporter); |
7 | 7 | our %EXPORT_TAGS = ( all => [qw(random_bytes random_bytes_hex random_bytes_b64 random_bytes_b64u random_string random_string_from rand irand)] ); |
1 | 1 | |
2 | 2 | use strict; |
3 | 3 | use warnings; |
4 | our $VERSION = '0.075'; | |
4 | our $VERSION = '0.076'; | |
5 | 5 | |
6 | 6 | use base qw(Crypt::PRNG Exporter); |
7 | 7 | our %EXPORT_TAGS = ( all => [qw(random_bytes random_bytes_hex random_bytes_b64 random_bytes_b64u random_string random_string_from rand irand)] ); |
1 | 1 | |
2 | 2 | use strict; |
3 | 3 | use warnings; |
4 | our $VERSION = '0.075'; | |
4 | our $VERSION = '0.076'; | |
5 | 5 | |
6 | 6 | require Exporter; our @ISA = qw(Exporter); ### use Exporter 5.57 'import'; |
7 | 7 | our %EXPORT_TAGS = ( all => [qw(random_bytes random_bytes_hex random_bytes_b64 random_bytes_b64u random_string random_string_from rand irand)] ); |
1 | 1 | |
2 | 2 | use strict; |
3 | 3 | use warnings; |
4 | our $VERSION = '0.075'; | |
4 | our $VERSION = '0.076'; | |
5 | 5 | |
6 | 6 | use CryptX; |
7 | 7 |
1 | 1 | |
2 | 2 | use strict; |
3 | 3 | use warnings; |
4 | our $VERSION = '0.075'; | |
4 | our $VERSION = '0.076'; | |
5 | 5 | |
6 | 6 | use CryptX; |
7 | 7 |
1 | 1 | |
2 | 2 | use strict; |
3 | 3 | use warnings; |
4 | our $VERSION = '0.075'; | |
4 | our $VERSION = '0.076'; | |
5 | 5 | |
6 | 6 | use CryptX; |
7 | 7 |
1 | 1 | |
2 | 2 | use strict; |
3 | 3 | use warnings; |
4 | our $VERSION = '0.075'; | |
4 | our $VERSION = '0.076'; | |
5 | 5 | |
6 | 6 | use CryptX; |
7 | 7 |
1 | 1 | |
2 | 2 | use strict; |
3 | 3 | use warnings; |
4 | our $VERSION = '0.075'; | |
4 | our $VERSION = '0.076'; | |
5 | 5 | |
6 | 6 | use CryptX; |
7 | 7 |
1 | 1 | |
2 | 2 | use strict; |
3 | 3 | use warnings; |
4 | our $VERSION = '0.075'; | |
4 | our $VERSION = '0.076'; | |
5 | 5 | |
6 | 6 | use CryptX; |
7 | 7 |
1 | 1 | |
2 | 2 | use strict; |
3 | 3 | use warnings ; |
4 | our $VERSION = '0.075'; | |
4 | our $VERSION = '0.076'; | |
5 | 5 | |
6 | 6 | require XSLoader; |
7 | 7 | XSLoader::load('CryptX', $VERSION); |
110 | 110 | |
111 | 111 | =head1 COPYRIGHT |
112 | 112 | |
113 | Copyright (c) 2013-2021 DCIT, a.s. L<https://www.dcit.cz> / Karel Miko | |
113 | Copyright (c) 2013-2022 DCIT, a.s. L<https://www.dcit.cz> / Karel Miko | |
114 | 114 | |
115 | 115 | =cut |