2010-03-28 22:10:10 +00:00
|
|
|
<?xml version="1.0" encoding="utf-8"?>
|
2009-07-11 08:26:23 +00:00
|
|
|
<!-- $Revision$ -->
|
2007-06-20 22:25:43 +00:00
|
|
|
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.openssl-private-encrypt">
|
2007-06-11 23:31:04 +00:00
|
|
|
<refnamediv>
|
|
|
|
<refname>openssl_private_encrypt</refname>
|
|
|
|
<refpurpose>Encrypts data with private key </refpurpose>
|
|
|
|
</refnamediv>
|
2007-06-11 23:31:38 +00:00
|
|
|
|
|
|
|
<refsect1 role="description">
|
|
|
|
&reftitle.description;
|
2007-06-11 23:31:04 +00:00
|
|
|
<methodsynopsis>
|
|
|
|
<type>bool</type><methodname>openssl_private_encrypt</methodname>
|
|
|
|
<methodparam><type>string</type><parameter>data</parameter></methodparam>
|
|
|
|
<methodparam><type>string</type><parameter role="reference">crypted</parameter></methodparam>
|
|
|
|
<methodparam><type>mixed</type><parameter>key</parameter></methodparam>
|
2009-01-19 15:05:01 +00:00
|
|
|
<methodparam choice="opt"><type>int</type><parameter>padding</parameter><initializer>OPENSSL_PKCS1_PADDING</initializer></methodparam>
|
2007-06-11 23:31:04 +00:00
|
|
|
</methodsynopsis>
|
|
|
|
<para>
|
|
|
|
<function>openssl_private_encrypt</function> encrypts <parameter>data</parameter>
|
|
|
|
with private <parameter>key</parameter> and stores the result into
|
|
|
|
<parameter>crypted</parameter>. Encrypted data can be decrypted via
|
2007-06-11 23:31:38 +00:00
|
|
|
<function>openssl_public_decrypt</function>.
|
2007-06-11 23:31:04 +00:00
|
|
|
</para>
|
|
|
|
<para>
|
|
|
|
This function can be used e.g. to sign data (or its hash) to prove that it
|
|
|
|
is not written by someone else.
|
|
|
|
</para>
|
2007-06-11 23:31:38 +00:00
|
|
|
</refsect1>
|
|
|
|
|
|
|
|
<refsect1 role="parameters">
|
|
|
|
&reftitle.parameters;
|
2007-06-11 23:31:04 +00:00
|
|
|
<para>
|
2007-06-11 23:31:38 +00:00
|
|
|
<variablelist>
|
|
|
|
<varlistentry>
|
|
|
|
<term><parameter>data</parameter></term>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
<varlistentry>
|
|
|
|
<term><parameter>crypted</parameter></term>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
<varlistentry>
|
|
|
|
<term><parameter>key</parameter></term>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
<varlistentry>
|
|
|
|
<term><parameter>padding</parameter></term>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
2009-11-25 14:49:47 +00:00
|
|
|
<parameter>padding</parameter> can be one of
|
|
|
|
<constant>OPENSSL_PKCS1_PADDING</constant>,
|
2007-06-11 23:31:38 +00:00
|
|
|
<constant>OPENSSL_NO_PADDING</constant>.
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
</variablelist>
|
2007-06-11 23:31:04 +00:00
|
|
|
</para>
|
|
|
|
</refsect1>
|
2007-06-11 23:31:38 +00:00
|
|
|
|
|
|
|
<refsect1 role="returnvalues">
|
|
|
|
&reftitle.returnvalues;
|
|
|
|
<para>
|
|
|
|
&return.success;
|
|
|
|
</para>
|
|
|
|
</refsect1>
|
|
|
|
|
|
|
|
<refsect1 role="seealso">
|
|
|
|
&reftitle.seealso;
|
|
|
|
<para>
|
|
|
|
<simplelist>
|
|
|
|
<member><function>openssl_public_encrypt</function></member>
|
|
|
|
<member><function>openssl_public_decrypt</function></member>
|
|
|
|
</simplelist>
|
|
|
|
</para>
|
|
|
|
</refsect1>
|
|
|
|
|
2007-06-11 23:31:04 +00:00
|
|
|
</refentry>
|
2002-04-15 00:12:54 +00:00
|
|
|
|
|
|
|
<!-- Keep this comment at the end of the file
|
|
|
|
Local variables:
|
|
|
|
mode: sgml
|
|
|
|
sgml-omittag:t
|
|
|
|
sgml-shorttag:t
|
|
|
|
sgml-minimize-attributes:nil
|
|
|
|
sgml-always-quote-attributes:t
|
|
|
|
sgml-indent-step:1
|
|
|
|
sgml-indent-data:t
|
|
|
|
indent-tabs-mode:nil
|
|
|
|
sgml-parent-document:nil
|
2009-09-25 07:04:39 +00:00
|
|
|
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
|
2002-04-15 00:12:54 +00:00
|
|
|
sgml-exposed-tags:nil
|
|
|
|
sgml-local-catalogs:nil
|
|
|
|
sgml-local-ecat-files:nil
|
|
|
|
End:
|
|
|
|
vim600: syn=xml fen fdm=syntax fdl=2 si
|
|
|
|
vim: et tw=78 syn=sgml
|
|
|
|
vi: ts=1 sw=1
|
|
|
|
-->
|