-
Notifications
You must be signed in to change notification settings - Fork 101
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
initial translation in reference/rnp/functions
- Loading branch information
1 parent
5e60a56
commit 018a1a6
Showing
12 changed files
with
1,473 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,188 @@ | ||
<?xml version="1.0" encoding="utf-8"?><!-- EN-Revision: 79bc1248b2295d9c9f0837d1ddcaea9d7c2853a7 Maintainer: leonardolara Status: ready --> | ||
<refentry xml:id="function.rnp-op-encrypt" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"> | ||
<refnamediv> | ||
<refname>rnp_op_encrypt</refname> | ||
<refpurpose>Criptografa mensagem</refpurpose> | ||
</refnamediv> | ||
|
||
<refsect1 role="description"> | ||
&reftitle.description; | ||
<methodsynopsis> | ||
<type class="union"><type>string</type><type>false</type></type><methodname>rnp_op_encrypt</methodname> | ||
<methodparam><type>RnpFFI</type><parameter>ffi</parameter></methodparam> | ||
<methodparam><type>string</type><parameter>message</parameter></methodparam> | ||
<methodparam><type>array</type><parameter>recipient_keys_fp</parameter></methodparam> | ||
<methodparam choice="opt"><type>array</type><parameter>options</parameter></methodparam> | ||
</methodsynopsis> | ||
<para> | ||
|
||
</para> | ||
|
||
</refsect1> | ||
|
||
<refsect1 role="parameters"> | ||
&reftitle.parameters; | ||
<variablelist> | ||
<varlistentry> | ||
<term><parameter>ffi</parameter></term> | ||
<listitem> | ||
<para> | ||
&rnp.parameter.ffi-description; | ||
</para> | ||
</listitem> | ||
</varlistentry> | ||
<varlistentry> | ||
<term><parameter>message</parameter></term> | ||
<listitem> | ||
<para> | ||
Mensagem a ser criptografada. | ||
</para> | ||
</listitem> | ||
</varlistentry> | ||
<varlistentry> | ||
<term><parameter>recipient_keys_fp</parameter></term> | ||
<listitem> | ||
<para> | ||
Array com impressões digitais das chaves do destinatário. Pelo menos uma chave deve estar presente. | ||
</para> | ||
</listitem> | ||
</varlistentry> | ||
<varlistentry> | ||
<term><parameter>options</parameter></term> | ||
<listitem> | ||
<para> | ||
Um array associativo com opções. | ||
</para> | ||
<informaltable> | ||
<tgroup cols="2"> | ||
<thead> | ||
<row> | ||
<entry>Chave</entry> | ||
<entry>Tipo de dado</entry> | ||
<entry>&Description;</entry> | ||
</row> | ||
</thead> | ||
<tbody> | ||
<row> | ||
<entry><literal>"compression_alg"</literal></entry> | ||
<entry>string</entry> | ||
<entry>Algoritmo de compressão. Tanto | ||
<literal>"compression_alg"</literal> quanto <literal>"compression_level"</literal> | ||
precisam ser definidos para ativar a compactação de dados. | ||
</entry> | ||
</row> | ||
<row> | ||
<entry><literal>"compression_level"</literal></entry> | ||
<entry>inteiro</entry> | ||
<entry>Nível de compactação, 0-9. 0 desativa a compactação.</entry> | ||
</row> | ||
<row> | ||
<entry><literal>"armor"</literal></entry> | ||
<entry>booleano</entry> | ||
<entry>Habilita a saída blindada ASCII. Desativado por padrão.</entry> | ||
</row> | ||
<row> | ||
<entry><literal>"add_signature"</literal></entry> | ||
<entry>booleano</entry> | ||
<entry>A mensagem criptografada também será assinada.</entry> | ||
</row> | ||
<row> | ||
<entry><literal>"hash"</literal></entry> | ||
<entry>string</entry> | ||
<entry>Define o algoritmo hash usado durante o cálculo da assinatura. A opção "add_signature" deve ser definida como &true;</entry> | ||
</row> | ||
<row> | ||
<entry><literal>"creation_time"</literal></entry> | ||
<entry>inteiro</entry> | ||
<entry>Defina o horário de criação da assinatura em segundos desde 1º de janeiro de 1970 UTC. Por padrão, o horário atual é usado.</entry> | ||
</row> | ||
<row> | ||
<entry><literal>"expiration_time"</literal></entry> | ||
<entry>inteiro</entry> | ||
<entry>Define o tempo de expiração da assinatura em segundos desde o momento da criação. O valor 0 é usado para marcar | ||
a assinatura como não expirante (valor padrão). | ||
</entry> | ||
</row> | ||
<row> | ||
<entry><literal>"password"</literal></entry> | ||
<entry>string</entry> | ||
<entry>Adiciona a senha que é usada para criptografar dados.</entry> | ||
</row> | ||
<row> | ||
<entry><literal>"cipher"</literal></entry> | ||
<entry>string</entry> | ||
<entry> | ||
Define o algoritmo de criptografia simétrica. Os valores possíveis são "IDEA", "TRIPLEDES", | ||
"CAST5", "BLOWFISH", "AES128", "AES192", "AES256", "TWOFISH", "CAMELLIA128", | ||
"CAMELLIA192", "CAMELLIA256" e "SM4" . | ||
</entry> | ||
</row> | ||
<row> | ||
<entry><literal>"aead"</literal></entry> | ||
<entry>string</entry> | ||
<entry> | ||
Define o algoritmo do modo AEAD. Os valores possíveis são "None" para desabilitar AEAD, "EAX" e "OCB". | ||
</entry> | ||
</row> | ||
<row> | ||
<entry><literal>"aead_bits"</literal></entry> | ||
<entry>inteiro</entry> | ||
<entry>Define o comprimento do bloco para o modo AEAD por meio do número de bits por bloco. Deve estar entre 0 e 56.</entry> | ||
</row> | ||
<row> | ||
<entry><literal>"flags"</literal></entry> | ||
<entry>inteiro</entry> | ||
<entry> | ||
Define opções de criptografia adicionais. Opções suportadas: RNP_ENCRYPT_NOWRAP - não encapsula os dados em um pacote de dados literal. Isso | ||
permitiria criptografar dados já assinados. | ||
</entry> | ||
</row> | ||
<row> | ||
<entry><literal>"file_name"</literal></entry> | ||
<entry>string</entry> | ||
<entry>Define o nome do arquivo armazenado internamente para os dados que estão sendo criptografados. O valor especial _CONSOLE pode ser usado para marcar a mensagem | ||
como 'somente para seus olhos', ou seja, ela não deve ser armazenada em qualquer lugar, mas apenas exibida | ||
para o receptor. O padrão é a string vazia.</entry> | ||
</row> | ||
<row> | ||
<entry><literal>"file_mtime"</literal></entry> | ||
<entry>inteiro</entry> | ||
<entry>Define a data de modificação do arquivo de entrada em segundos desde 1º de janeiro de 1970 UTC.</entry> | ||
</row> | ||
</tbody> | ||
</tgroup> | ||
</informaltable> | ||
</listitem> | ||
</varlistentry> | ||
</variablelist> | ||
</refsect1> | ||
|
||
<refsect1 role="returnvalues"> | ||
&reftitle.returnvalues; | ||
<para> | ||
Dados criptografados em caso de sucesso&return.falseforfailure;. | ||
</para> | ||
</refsect1> | ||
|
||
|
||
</refentry> | ||
<!-- 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 | ||
sgml-default-dtd-file:"~/.phpdoc/manual.ced" | ||
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 | ||
--> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,171 @@ | ||
<?xml version="1.0" encoding="utf-8"?><!-- EN-Revision: 79bc1248b2295d9c9f0837d1ddcaea9d7c2853a7 Maintainer: leonardolara Status: ready --> | ||
<refentry xml:id="function.rnp-op-generate-key" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"> | ||
<refnamediv> | ||
<refname>rnp_op_generate_key</refname> | ||
<refpurpose>Gera chave</refpurpose> | ||
</refnamediv> | ||
|
||
<refsect1 role="description"> | ||
&reftitle.description; | ||
<methodsynopsis> | ||
<type class="union"><type>string</type><type>false</type></type><methodname>rnp_op_generate_key</methodname> | ||
<methodparam><type>RnpFFI</type><parameter>ffi</parameter></methodparam> | ||
<methodparam><type>string</type><parameter>userid</parameter></methodparam> | ||
<methodparam><type>string</type><parameter>key_alg</parameter></methodparam> | ||
<methodparam choice="opt"><type>string</type><parameter>sub_alg</parameter></methodparam> | ||
<methodparam choice="opt"><type>array</type><parameter>options</parameter></methodparam> | ||
</methodsynopsis> | ||
<para> | ||
|
||
</para> | ||
|
||
|
||
</refsect1> | ||
|
||
<refsect1 role="parameters"> | ||
&reftitle.parameters; | ||
<variablelist> | ||
<varlistentry> | ||
<term><parameter>ffi</parameter></term> | ||
<listitem> | ||
<para> | ||
&rnp.parameter.ffi-description; | ||
</para> | ||
</listitem> | ||
</varlistentry> | ||
<varlistentry> | ||
<term><parameter>userid</parameter></term> | ||
<listitem> | ||
<para> | ||
ID de usuário PGP - texto cuja intenção é representar | ||
o nome e endereço de e-mail do titular da chave. | ||
</para> | ||
</listitem> | ||
</varlistentry> | ||
<varlistentry> | ||
<term><parameter>key_alg</parameter></term> | ||
<listitem> | ||
<para> | ||
Algoritmo de chave primária (ou seja, 'RSA', 'DSA', etc). | ||
</para> | ||
</listitem> | ||
</varlistentry> | ||
<varlistentry> | ||
<term><parameter>sub_alg</parameter></term> | ||
<listitem> | ||
<para> | ||
Algoritmo de subchave. Se não for definido, a subchave não será gerada. | ||
</para> | ||
</listitem> | ||
</varlistentry> | ||
<varlistentry> | ||
<term><parameter>options</parameter></term> | ||
<listitem> | ||
<para> | ||
Um array associativo com opções. | ||
</para> | ||
<informaltable> | ||
<tgroup cols="2"> | ||
<thead> | ||
<row> | ||
<entry>Chave</entry> | ||
<entry>Tipo de dado</entry> | ||
<entry>&Description;</entry> | ||
</row> | ||
</thead> | ||
<tbody> | ||
<row> | ||
<entry><literal>"bits"</literal></entry> | ||
<entry>inteiro</entry> | ||
<entry>Tamanho da chave primária em bits. Aplicável apenas às chaves RSA, DSA e El-Gamal.</entry> | ||
</row> | ||
<row> | ||
<entry><literal>"hash"</literal></entry> | ||
<entry>string</entry> | ||
<entry>Algoritmo hash usado em autoassinatura ou assinatura de ligação de subchave.</entry> | ||
</row> | ||
<row> | ||
<entry><literal>"dsa_qbits"</literal></entry> | ||
<entry>inteiro</entry> | ||
<entry>Define o tamanho de um parâmetro <literal>q</literal> para a chave DSA. | ||
Nota: o valor padrão apropriado será definido, dependendo dos bits da chave. No entanto, ele pode | ||
ser substituído, se necessário.</entry> | ||
</row> | ||
<row> | ||
<entry><literal>"curve"</literal></entry> | ||
<entry>string</entry> | ||
<entry>Define a curva usada para a chave ECC. Nota: isto só é aplicável para chaves ECDSA, ECDH e SM2.</entry> | ||
</row> | ||
<row> | ||
<entry><literal>"request_password"</literal></entry> | ||
<entry>booleano</entry> | ||
<entry>Habilita a solicitação de senha por meio do provedor de senha. Esta senha | ||
será usada para criptografia de chave. A função de retorno do provedor de senha deve ser definida | ||
antecipadamente chamando <function>rnp_ffi_set_pass_provider</function>. | ||
Nota: esta configuração será ignorada se a senha for definida via<literal>"password"</literal></entry> | ||
</row> | ||
<row> | ||
<entry><literal>"password"</literal></entry> | ||
<entry>string</entry> | ||
<entry>Define a senha usada para criptografar os dados da chave secreta.</entry> | ||
</row> | ||
<row> | ||
<entry><literal>"expiration"</literal></entry> | ||
<entry>inteiro</entry> | ||
<entry>Define o tempo de expiração da chave e da subchave em segundos.</entry> | ||
</row> | ||
<row> | ||
<entry><literal>"sub_bits"</literal></entry> | ||
<entry>inteiro</entry> | ||
<entry>Tamanho da subchave em bits. Aplicável apenas às chaves RSA, DSA e El-Gamal.</entry> | ||
</row> | ||
<row> | ||
<entry><literal>"sub_hash"</literal></entry> | ||
<entry>string</entry> | ||
<entry>Algoritmo hash usado na autoassinatura de subchave ou assinatura de ligação de subchave.</entry> | ||
</row> | ||
<row> | ||
<entry><literal>"sub_curve"</literal></entry> | ||
<entry>string</entry> | ||
<entry>Define a curva usada para a subchave ECC. Nota: isto só é aplicável para chaves ECDSA, ECDH e SM2.</entry> | ||
</row> | ||
</tbody> | ||
</tgroup> | ||
</informaltable> | ||
</listitem> | ||
</varlistentry> | ||
</variablelist> | ||
</refsect1> | ||
|
||
<refsect1 role="returnvalues"> | ||
&reftitle.returnvalues; | ||
<para> | ||
Impressão digital da chave primária gerada&return.falseforfailure;. Esta impressão digital pode ser usada | ||
posteriormente para fazer referência à chave em operações de assinatura e criptografia. Os dados da chave são armazenados no | ||
contexto da memória FFI e podem ser salvos usando | ||
<function>rnp_save_keys</function> ou <function>rnp_save_keys_to_path</function>. | ||
</para> | ||
</refsect1> | ||
|
||
|
||
</refentry> | ||
<!-- 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 | ||
sgml-default-dtd-file:"~/.phpdoc/manual.ced" | ||
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 | ||
--> |
Oops, something went wrong.