pike.git
/
src
/
post_modules
/
Nettle
/
hogweed.cmod
version
»
Context lines:
10
20
40
80
file
none
3
pike.git/src/post_modules/Nettle/hogweed.cmod:733:
{ CVAR struct ecc_point point; /*! @decl inherit ECC_Curve::Point */ EXTRA { /* Perform an inherit of the Point class that our parent * contains via its inherit of __builtin.Nettle.ECC_Curve. */
-
struct program *parent
_
prog = Pike
_
compiler->previous->new_program;
-
struct object *parent_obj = Pike_compiler->previous->fake_object;
-
int parent_Point_fun_num =
-
really_low_find_shared_string_identifier
(MK_STRING("Point")
,
-
parent_prog,
-
SEE_PROTECTED|SEE_PRIVATE
);
-
if (parent_Point_fun_num >= 0) {
-
struct program *parent_Point_prog =
-
low_program_from_function(parent_obj, parent_Point_fun_num);
-
if (parent_Point_prog) {
-
parent_Point_fun_num =
-
really_low_reference_inherited_identifier(Pike_compiler->previous,
-
0, parent_Point_fun_num);
-
low_inherit(parent_Point_prog, 0,
-
parent_Point_fun_num,
-
1 + 42, 0, NULL);
+
inherit
_
internal
_
class
(MK_STRING("Point"));
}
-
}
-
}
+
INIT { const struct Nettle_ECC_Curve_struct *parent = parent_storage(1, Nettle_ECC_Curve_program); const struct ecc_curve *curve = parent->curve; if (!curve) Pike_error("No curve selected.\n"); ecc_point_init(&THIS->point, curve);
pike.git/src/post_modules/Nettle/hogweed.cmod:957:
program_flags PROGRAM_USES_PARENT|PROGRAM_NEEDS_PARENT|PROGRAM_CLEAR_STORAGE; { /*! @decl inherit Point *! *! This point represents the public key. */ EXTRA { /* Perform an inherit of the Point class that our parent contains. */
-
struct program *parent
_
prog = Pike
_
compiler->previous->new_program;
-
struct object *parent_obj = Pike_compiler->previous->fake_object;
-
int parent_Point_fun_num =
-
really_low_find_shared_string_identifier
(MK_STRING("Point")
,
-
parent_prog,
-
SEE_PROTECTED|SEE_PRIVATE
);
-
if (parent_Point_fun_num >= 0) {
-
struct program *parent_Point_prog =
-
low_program_from_function(parent_obj, parent_Point_fun_num);
-
-
#ifdef PIKE_DEBUG
-
if (parent_Point_prog != Nettle_ECC_Curve_Point_program) {
-
Pike_fatal("Unexpected Point program.\n");
+
inherit
_
internal
_
class
(MK_STRING("Point"));
}
-
#endif
+
-
if (parent_Point_prog) {
-
parent_Point_fun_num =
-
really_low_reference_inherited_identifier(Pike_compiler->previous,
-
0, parent_Point_fun_num);
-
low_inherit(parent_Point_prog, 0,
-
parent_Point_fun_num,
-
1 + 42, 0, NULL);
-
}
-
}
-
}
-
+
/*! @decl inherit __builtin.Nettle.Sign */ INHERIT "__builtin.Nettle.Sign"; CVAR struct ecc_scalar key; PIKEVAR function(int(0..):string(0..255)) random flags ID_PROTECTED; INIT
pike.git/src/post_modules/Nettle/hogweed.cmod:1365:
{ PIKEVAR string(8bit) point flags ID_PRIVATE|ID_PROTECTED|ID_HIDDEN; /*! @decl inherit ECC_Curve::Point */ EXTRA { /* Perform an inherit of the Point class that our parent * contains via its inherit of __builtin.Nettle.ECC_Curve. */
-
struct program *parent
_
prog = Pike
_
compiler->previous->new_program;
-
struct object *parent_obj = Pike_compiler->previous->fake_object;
-
int parent_Point_fun_num =
-
really_low_find_shared_string_identifier
(MK_STRING("Point")
,
-
parent_prog,
-
SEE_PROTECTED|SEE_PRIVATE
);
-
if (parent_Point_fun_num >= 0) {
-
struct program *parent_Point_prog =
-
low_program_from_function(parent_obj, parent_Point_fun_num);
-
if (parent_Point_prog) {
-
parent_Point_fun_num =
-
really_low_reference_inherited_identifier(Pike_compiler->previous,
-
0, parent_Point_fun_num);
-
low_inherit(parent_Point_prog, 0,
-
parent_Point_fun_num,
-
1 + 42, 0, NULL);
+
inherit
_
internal
_
class
(MK_STRING("Point"));
}
-
}
-
}
+
PIKEFUN void set(string(8bit) x, string(8bit)|void y) flags ID_VARIANT; { if (x->len != CURVE25519_SIZE) { Pike_error("Invalid x.\n"); } if (y && y->len) { Pike_error("Invalid y.\n"); }
pike.git/src/post_modules/Nettle/hogweed.cmod:1467:
program_flags PROGRAM_USES_PARENT|PROGRAM_NEEDS_PARENT|PROGRAM_CLEAR_STORAGE; { /*! @decl inherit Point *! *! This point represents the public key. */ EXTRA { /* Perform an inherit of the Point class that our parent contains. */
-
struct program *parent
_
prog = Pike
_
compiler->previous->new_program;
-
struct object *parent_obj = Pike_compiler->previous->fake_object;
-
int parent_Point_fun_num =
-
really_low_find_shared_string_identifier
(MK_STRING("Point")
,
-
parent_prog,
-
SEE_PROTECTED|SEE_PRIVATE
);
-
if (parent_Point_fun_num >= 0) {
-
struct program *parent_Point_prog =
-
low_program_from_function(parent_obj, parent_Point_fun_num);
-
-
#ifdef PIKE_DEBUG
-
if (parent_Point_prog != Nettle_Curve25519_Point_program) {
-
Pike_fatal("Unexpected Point program.\n");
+
inherit
_
internal
_
class
(MK_STRING("Point"));
}
-
#endif
+
-
if (parent_Point_prog) {
-
parent_Point_fun_num =
-
really_low_reference_inherited_identifier(Pike_compiler->previous,
-
0, parent_Point_fun_num);
-
low_inherit(parent_Point_prog, 0,
-
parent_Point_fun_num,
-
1 + 42, 0, NULL);
-
}
-
}
-
}
-
+
/*! @decl inherit __builtin.Nettle.Sign */ INHERIT "__builtin.Nettle.Sign"; PIKEVAR string(8bit) private_key flags ID_PRIVATE|ID_HIDDEN; PIKEVAR function(int(0..):string(0..255)) random flags ID_PROTECTED; INIT