Re: PECL extension for TypeKey Authentication
| From: | Sara Golemon | Date: | Fri, 27 Aug 2004 15:12:33 +0000 |
| Subject: | Re: PECL extension for TypeKey Authentication | ||
| References: | 1 | Groups: | php.pecl.dev |
| Request: | Send a blank email to pecl-dev+get-1232@lists.php.net to get a copy of this message | ||
Almost everything you need to know about array handling is covered in
Zend/zend_hash.h
The specific functions you'll be most interrested in for associative arrays
are:
zend_hash_exists() <--- does a particular key exist in an array
zend_hash_find() <---- actually get the data associated with a key
Note: If you're going to get the data anyway,
you might as well use find() and
not bother with exists()
zend_hash_add() <--- Add an element
zend_hash_del() <---- Delete an element
However you'll also be interrested in the array_init(), and add_*() macros
which make creating hashes of zvals easier to approach. See
http://www.php.net/manual/en/zend.variables.array.php
-Sara
"Jacques Marneweck" <jmarneweck@gmail.com> wrote in message
news:4802d05204082707052978ffd7@mail.gmail.com...
> Hi,
>
> I think this is most likely the best place to start. I used the
> ext-skel stuff to setup the initial PECL module for TypeKey.
>
> Seeing that I've not coded much in c over the past couple of years,
> I'm going to need some pointers so that I can get some sort of module
> up that can allow verification of authenication done via the TypeKey
> [1] website of Sixapart.
>
> I'm trying to make it as close as posible to the perl
> Authen::TypeKey[2] which Benjamin Trott[3] wrote.
>
> Are there any documentation which can help me with using PHP array
> within c and how does one check that you have various 'keys' set in
> the array being passed to the function. I have figured out how to use
> Open SSL for DSA after some hacking on my FreeBSD workstation.
>
> Regards
> --jm
>
> [1] http://www.typekey.com/
> [2] http://search.cpan.org/~btrott/Authen-TypeKey-0.02/
> [3] http://www.stupidfool.org/
>
> --
> Jacques Marneweck
> http://www.powertrip.co.za/blog/