Jump to content

sookyboo

New Members
  • Posts

    4
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

sookyboo's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. thanks I tried: base_convert($hex, 16, 2); The binary value is shorter than the hex value though... so... I am npt sure if its right... I can only test if it really is the right value after I encrypt it, which I am also having trouble with Thanks very much for the help though http://www.phpfreaks.com/forums/index.php?topic=168552.new;topicseen#new
  2. it does, I can display the file's content with an echo.
  3. I have a .cer file (generated from a jsp server I think). I need to extract it's public key and use the public key to encrypt a value... I get these errors: Warning: openssl_x509_read() [function.openssl-x509-read]: supplied parameter cannot be coerced into an X509 certificate! in /public_html/test/cert.php on line 26 Warning: openssl_x509_free() expects parameter 1 to be resource, string given in /public_html/test/cert.php on line 34 $fp = fopen("/home/x.cer", "r"); $cert = fread($fp, 8192); fclose($fp); openssl_x509_read( $cert); $data = openssl_x509_parse($cert); print_r($data); openssl_x509_free( $cert ); Any ideas what is wrong... Starting to get frustrated... Thanks in advance
  4. Anyone know how to convert this java code to php? // Take the signature passed, a signed hexadecimal value and // and convert to a byte array in 2's compliment, big-endian. // We wrap in a try-catch in case the signature is not a signed // hexadecimal number byte[] barray = new BigInteger(signature,16).toByteArray(); Thanks in advance
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.