Click here to Skip to main content
15,912,507 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hey guys, does any one has an idea about, how to generate Nonce with wsse in C#

PHP
$timestamp     = gmdate('Y-m-d\TH:i:s\Z');
$password = 'XXXXXXX';
        $nonce  = mt_rand();
        
        $passdigest = base64_encode(
                        pack('H*',
                                sha1(
                                        pack('H*', $nonce) . pack('a*',$timestamp).
                                        pack('a*',$password)
                                     )
                             )
                        );

echo $timestamp;
echo '/////////';
echo $passdigest;
echo '/////////';
echo base64_encode(pack('H*', $nonce));;


Above is the php code which i have to do it in C#
Posted
Updated 28-Mar-16 1:29am
v3

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900