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:832:
*/ /*! @class ECDSA *! *! Elliptic Curve Digital Signing Algorithm */ PIKECLASS ECDSA program_flags PROGRAM_USES_PARENT|PROGRAM_NEEDS_PARENT|PROGRAM_CLEAR_STORAGE; { /*! @decl inherit Point
+
*!
+
*! This point represents the public key.
*/
-
INHERIT
Nettle
_
ECC
_
Curve
_Point;
+
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");
+
}
+
#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