pike.git / src / post_modules / Nettle / hogweed.cmod

version» Context lines:

pike.git/src/post_modules/Nettle/hogweed.cmod:1: - /* -*- c -*- + /* -*- mode: c; encoding: utf-8; -*-   || This file is part of Pike. For copyright information see COPYRIGHT.   || Pike is distributed under GPL, LGPL and MPL. See the file COPYING   || for more information.   */      #include "global.h"   #include "pike_compiler.h"   #include "builtin_functions.h"   #include "operators.h"   #include "interpret.h"
pike.git/src/post_modules/Nettle/hogweed.cmod:1039:    */    PIKEFUN object(Gmp.mpz) get_private_key()    {    struct object *ret;    push_object(ret = fast_clone_object(bignum_program));    ecc_scalar_get(&THIS->key, (mpz_ptr)ret->storage);    }       /*! @decl void set_private_key(object(Gmp.mpz)|int k)    *! -  *! Set the private key (and corresponding private key). +  *! Set the private key (and corresponding public key).    *!    *! @note    *! Throws errors if the key isn't valid for the curve.    */    PIKEFUN void set_private_key(object(Gmp.mpz)|int k)    {    struct ecc_point *pub;    convert_svalue_to_bignum(k);    if (!ecc_scalar_set(&THIS->key, (mpz_srcptr)k->u.object->storage)) {    SIMPLE_ARG_ERROR("set_private_key", 1, "Invalid key for curve.");