PluginProbe
Defender Security – Malware Scanner, Login Security & Firewall / 5.4.1
Defender Security – Malware Scanner, Login Security & Firewall v5.4.1
6.3.0 6.2.3 6.2.4 6.2.0 6.2.1 6.2.2 6.1.0 5.3.1 5.4.0 5.4.1 5.5.0 5.5.1 5.6.0 5.6.1 5.6.2 5.7.0 5.7.1 5.7.2 5.8.0 5.8.1 5.9.0 6.0.0 6.0.1 3.0.1 3.1.0 All 141 releases
defender-security / vendor / thecodingmachine / safe / generated / gnupg.php

gnupg.php in Defender Security – Malware Scanner, Login Security & Firewall 5.4.1, at vendor/thecodingmachine/safe/generated/gnupg.php

169 lines 3.8 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace Safe;
4
5 use Safe\Exceptions\GnupgException;
6
7 /**
8 *
9 *
10 * @param resource $identifier The gnupg identifier, from a call to
11 * gnupg_init or gnupg.
12 * @param string $fingerprint The fingerprint key.
13 * @param string $passphrase The pass phrase.
14 * @throws GnupgException
15 *
16 */
17 function gnupg_adddecryptkey($identifier, string $fingerprint, string $passphrase): void
18 {
19 error_clear_last();
20 $result = \gnupg_adddecryptkey($identifier, $fingerprint, $passphrase);
21 if ($result === false) {
22 throw GnupgException::createFromPhpError();
23 }
24 }
25
26
27 /**
28 *
29 *
30 * @param resource $identifier The gnupg identifier, from a call to
31 * gnupg_init or gnupg.
32 * @param string $fingerprint The fingerprint key.
33 * @throws GnupgException
34 *
35 */
36 function gnupg_addencryptkey($identifier, string $fingerprint): void
37 {
38 error_clear_last();
39 $result = \gnupg_addencryptkey($identifier, $fingerprint);
40 if ($result === false) {
41 throw GnupgException::createFromPhpError();
42 }
43 }
44
45
46 /**
47 *
48 *
49 * @param resource $identifier The gnupg identifier, from a call to
50 * gnupg_init or gnupg.
51 * @param string $fingerprint The fingerprint key.
52 * @param string $passphrase The pass phrase.
53 * @throws GnupgException
54 *
55 */
56 function gnupg_addsignkey($identifier, string $fingerprint, string $passphrase = null): void
57 {
58 error_clear_last();
59 if ($passphrase !== null) {
60 $result = \gnupg_addsignkey($identifier, $fingerprint, $passphrase);
61 } else {
62 $result = \gnupg_addsignkey($identifier, $fingerprint);
63 }
64 if ($result === false) {
65 throw GnupgException::createFromPhpError();
66 }
67 }
68
69
70 /**
71 *
72 *
73 * @param resource $identifier The gnupg identifier, from a call to
74 * gnupg_init or gnupg.
75 * @throws GnupgException
76 *
77 */
78 function gnupg_cleardecryptkeys($identifier): void
79 {
80 error_clear_last();
81 $result = \gnupg_cleardecryptkeys($identifier);
82 if ($result === false) {
83 throw GnupgException::createFromPhpError();
84 }
85 }
86
87
88 /**
89 *
90 *
91 * @param resource $identifier The gnupg identifier, from a call to
92 * gnupg_init or gnupg.
93 * @throws GnupgException
94 *
95 */
96 function gnupg_clearencryptkeys($identifier): void
97 {
98 error_clear_last();
99 $result = \gnupg_clearencryptkeys($identifier);
100 if ($result === false) {
101 throw GnupgException::createFromPhpError();
102 }
103 }
104
105
106 /**
107 *
108 *
109 * @param resource $identifier The gnupg identifier, from a call to
110 * gnupg_init or gnupg.
111 * @throws GnupgException
112 *
113 */
114 function gnupg_clearsignkeys($identifier): void
115 {
116 error_clear_last();
117 $result = \gnupg_clearsignkeys($identifier);
118 if ($result === false) {
119 throw GnupgException::createFromPhpError();
120 }
121 }
122
123
124 /**
125 * Toggle the armored output.
126 *
127 * @param resource $identifier The gnupg identifier, from a call to
128 * gnupg_init or gnupg.
129 * @param int $armor Pass a non-zero integer-value to this function to enable armored-output
130 * (default).
131 * Pass 0 to disable armored output.
132 * @throws GnupgException
133 *
134 */
135 function gnupg_setarmor($identifier, int $armor): void
136 {
137 error_clear_last();
138 $result = \gnupg_setarmor($identifier, $armor);
139 if ($result === false) {
140 throw GnupgException::createFromPhpError();
141 }
142 }
143
144
145 /**
146 * Sets the mode for signing.
147 *
148 * @param resource $identifier The gnupg identifier, from a call to
149 * gnupg_init or gnupg.
150 * @param int $signmode The mode for signing.
151 *
152 * signmode takes a constant indicating what type of
153 * signature should be produced. The possible values are
154 * GNUPG_SIG_MODE_NORMAL,
155 * GNUPG_SIG_MODE_DETACH and
156 * GNUPG_SIG_MODE_CLEAR.
157 * By default GNUPG_SIG_MODE_CLEAR is used.
158 * @throws GnupgException
159 *
160 */
161 function gnupg_setsignmode($identifier, int $signmode): void
162 {
163 error_clear_last();
164 $result = \gnupg_setsignmode($identifier, $signmode);
165 if ($result === false) {
166 throw GnupgException::createFromPhpError();
167 }
168 }
169