You just wasted time posting this here, just commit it. :)

--Jani

On Wed, 2007-08-01 at 12:56 +0400, Dmitry Stogov wrote:
> Hi,
> 
> I propose a patch for ext/openssl that extends support for crypto API.
> - it provides access to openSSL digest functions
>       function openssl_get_md_methods();
>       function openssl_digest(string $data, string $method [, bool $raw]);
> - it provides access to openSSL digest functions
>       function openssl_get_cipher_methods();
>       function openssl_encrypt(string $data, string $method, $string
> $password [, bool $raw]);
>       function openssl_decrypt(string $data, string $method, $string
> $password [, bool $raw]);
> - It extends existing functions openssl_pkey_new() and
> openssl_pkey_get_details() to access internal values of DSA, RSA and DH
> keys. For example you can create DH key and then access its internal values
> using the following code:
>       <?php
>               $dh = openssl_pkey_new(array('dh' => array(
>                       'p' => pack('H*', 'dcf93a0b883972ec'),
>                       'g' => pack(H*', '02')));
>               $details = openssl_pkey_get_details($dh);
>               var_dump(base64_encode($deteils['dh']['p']));
>               var_dump(base64_encode($deteils['dh']['g']));
>               var_dump(base64_encode($deteils['dh']['priv_key']));
>               var_dump(base64_encode($deteils['dh']['pub_key']));
>       ?>
> - it provides new function that computes shared secret for two DH keys
>       function openssl_dh_compute_key(string $pub_key, resource $dh)
> - it also extend some functions to support string name of crypto algorith in
> addition to numeric constants.
> 
> This patch was written to implement OpenID protocol in PHP.
> It is similar to patch by Wez
> http://netevil.org/blog/2007/feb/openid-and-typekey-using-native-openssl-fun
> ctions-in-php
> but it provides less additional functions and works with big numbers as with
> strings (instead of resources).
> 
> I would like to commit the path to PHP_5_2 and HEAD.
> Any objections?
> 
> Thanks. Dmitry. 
> -- 
> PHP Internals - PHP Runtime Development Mailing List
> To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to