Linux-WireGuard

 view release on metacpan or  search on metacpan

easyxs/README.md  view on Meta::CPAN

99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
## SV “Typing”
 
Perl scalars are supposed to be “untyped”, at least insofar as
strings/numbers. When conversing with other languages, though, or
serializing it’s usually helpful to break things down in greater
detail.
 
EasyXS defines an `exs_sv_type` macro that takes an SV as argument
and returns a member of `enum exs_sv_type_e` (typedef’d as just
`exs_sv_type_e`; see `easyxs_scalar.h` for values). The logic is compatible
with the serialization logic formulated during Perl 5.36’s development cycle.
 
## SV/Number Conversion
 
### `UV* exs_SvUV(SV* sv)`
 
Like `SvUV`, but if the SV’s content can’t be a UV
(e.g., the IV is negative, or the string has non-numeric characters)
an exception is thrown.
 
## SV/String Conversion

wireguard-tools/src/curve25519-fiat32.h  view on Meta::CPAN

805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
*   to_xz (r*P)     === if swap then (x3, z3) else (x2, z2)
 *   to_xz ((r+1)*P) === if swap then (x2, z2) else (x3, z3)
 *   x1 is the nonzero x coordinate of the nonzero
 *   point (r*P-(r+1)*P)
 */
unsigned b = 1 & (e[pos / 8] >> (pos & 7));
swap ^= b;
fe_cswap(&x2, &x3, swap);
fe_cswap(&z2, &z3, swap);
swap = b;
/* Coq transcription of ladderstep formula (called from
 * transcribed loop):
 */
fe_sub(&tmp0l, &x3, &z3);
fe_sub(&tmp1l, &x2, &z2);
fe_add(&x2l, &x2, &z2);
fe_add(&z2l, &x3, &z3);



( run in 0.343 second using v1.01-cache-2.11-cpan-1dc43b0fbd2 )