Hi!
I have a key file called: "instancia_ope.key"
I transformed it to .pem file with:
openssl pkcs8 -inform DER -in instancia_ope.key -out i.pem
in order to use it in the openssl functions in php:
I encrypt the string: f2e140eb-2b09-44ab-8504-87b25d81914c, like the following
$fp=fopen("i.pem","r");
$priv_key=fread ($fp,8192);
fclose($fp);
openssl_get_privatekey ($priv_key);
$source = "f2e140eb-2b09-44ab-8504-87b25d81914c";
openssl_private_encrypt($source,$finaltext,$priv_key);
echo "String crypted: $finaltext";
But the String crypted $finaltext, looks like:
--
You received this message because you are subscribed to the Google Groups "xmlseclibs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to xmlseclibs+...@googlegroups.com.
To post to this group, send email to xmlse...@googlegroups.com.
Visit this group at http://groups.google.com/group/xmlseclibs?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.