line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
MODULE = ZMQ::Raw PACKAGE = ZMQ::Raw::Curve |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
void |
4
|
|
|
|
|
|
|
keypair (class) |
5
|
|
|
|
|
|
|
SV *class |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
PREINIT: |
8
|
|
|
|
|
|
|
int rc, ctx; |
9
|
|
|
|
|
|
|
SV *public_key, *private_key; |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
PPCODE: |
12
|
5
|
50
|
|
|
|
|
ctx = GIMME_V; |
13
|
|
|
|
|
|
|
|
14
|
5
|
100
|
|
|
|
|
if (ctx == G_VOID) |
15
|
1
|
|
|
|
|
|
XSRETURN_EMPTY; |
16
|
|
|
|
|
|
|
|
17
|
4
|
|
|
|
|
|
public_key = sv_2mortal (newSV (41)); |
18
|
4
|
|
|
|
|
|
private_key = sv_2mortal (newSV (41)); |
19
|
4
|
|
|
|
|
|
SvPOK_on (public_key); |
20
|
4
|
|
|
|
|
|
SvPOK_on (private_key); |
21
|
4
|
|
|
|
|
|
SvCUR_set (public_key, 40); |
22
|
4
|
|
|
|
|
|
SvCUR_set (private_key, 40); |
23
|
|
|
|
|
|
|
|
24
|
4
|
|
|
|
|
|
rc = zmq_curve_keypair (SvPVX (public_key), SvPVX (private_key)); |
25
|
4
|
50
|
|
|
|
|
zmq_raw_check_error (rc); |
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
26
|
|
|
|
|
|
|
|
27
|
4
|
50
|
|
|
|
|
XPUSHs (private_key); |
28
|
4
|
100
|
|
|
|
|
if (ctx == G_ARRAY) |
29
|
|
|
|
|
|
|
{ |
30
|
3
|
50
|
|
|
|
|
XPUSHs (public_key); |
31
|
3
|
|
|
|
|
|
XSRETURN (2); |
32
|
|
|
|
|
|
|
} |
33
|
|
|
|
|
|
|
|
34
|
1
|
|
|
|
|
|
XSRETURN (1); |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
SV * |
37
|
|
|
|
|
|
|
public (class, private_key) |
38
|
|
|
|
|
|
|
SV *class |
39
|
|
|
|
|
|
|
SV *private_key |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
PREINIT: |
42
|
|
|
|
|
|
|
int rc; |
43
|
|
|
|
|
|
|
SV *public_key; |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
CODE: |
46
|
2
|
100
|
|
|
|
|
if (SvCUR (private_key) != 40) |
47
|
1
|
|
|
|
|
|
croak_usage ("private_key should be 40 bytes"); |
48
|
|
|
|
|
|
|
|
49
|
1
|
|
|
|
|
|
public_key = sv_2mortal (newSV (41)); |
50
|
1
|
|
|
|
|
|
SvPOK_on (public_key); |
51
|
1
|
|
|
|
|
|
SvCUR_set (public_key, 40); |
52
|
|
|
|
|
|
|
|
53
|
1
|
|
|
|
|
|
rc = zmq_curve_public (SvPVX (public_key), SvPVX (private_key)); |
54
|
1
|
50
|
|
|
|
|
zmq_raw_check_error (rc); |
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
55
|
|
|
|
|
|
|
|
56
|
1
|
|
|
|
|
|
SvREFCNT_inc (public_key); |
57
|
1
|
|
|
|
|
|
RETVAL = public_key; |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
OUTPUT: RETVAL |
60
|
|
|
|
|
|
|
|