note 107680 added to function.openssl-pkey-get-public

From: Date: Sat, 25 Feb 2012 19:35:13 +0000
Subject: note 107680 added to function.openssl-pkey-get-public
Groups: php.notes 
Request: Send a blank email to php-notes+get-186363@lists.php.net to get a copy of this message
If you have a 4096 bit key pair and are trying to use a public key that begins with: -----BEGIN RSA PUBLIC KEY----- and you need to convert it for this function to use, you can convert it by prepending the static header information: MIICIjANBgkqhkiG9w0BAQEFAAOCAg8A Such as: $start_key = str_replace('-----BEGIN RSA PUBLIC KEY-----', '', $start_key); $start_key = trim(str_replace('-----END RSA PUBLIC KEY-----', '', $start_key)); $key = 'MIICIjANBgkqhkiG9w0BAQEFAAOCAg8A' . str_replace("\n", '', $start_key); $key = "-----BEGIN PUBLIC KEY-----\n" . wordwrap($key, 64, "\n", true) . "\n-----END PUBLIC KEY-----"; ---- Server IP: 69.147.83.197 Probable Submitter: 66.92.36.222 ---- Manual Page -- http://www.php.net/manual/en/function.openssl-pkey-get-public.php Edit -- https://master.php.net/note/edit/107680 Del: integrated -- https://master.php.net/note/delete/107680/integrated Del: useless -- https://master.php.net/note/delete/107680/useless Del: bad code -- https://master.php.net/note/delete/107680/bad+code Del: spam -- https://master.php.net/note/delete/107680/spam Del: non-english -- https://master.php.net/note/delete/107680/non-english Del: in docs -- https://master.php.net/note/delete/107680/in+docs Del: other reasons-- https://master.php.net/note/delete/107680 Reject -- https://master.php.net/note/reject/107680 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#186363) next »