array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'en', ), 'this' => array ( 0 => 'function.rnp-op-sign.php', 1 => 'rnp_op_sign', ), 'up' => array ( 0 => 'ref.rnp.php', 1 => 'Rnp Functions', ), 'prev' => array ( 0 => 'function.rnp-op-sign-detached.php', 1 => 'rnp_op_sign_detached', ), 'next' => array ( 0 => 'function.rnp-op-verify-detached.php', 1 => 'rnp_op_verify_detached', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'en', 'path' => 'reference/rnp/functions/rnp-op-sign.xml', ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); ?>
(PECL rnp >= 0.1.1)
rnp_op_sign — Perform signing operation on a binary data, return embedded signature(s)
ffi
The FFI object returned by rnp_ffi_create.
data
Data to be signed.
keys_fp
Array with key fingerprints. At least one key must be provided.
Keys should be present in ffi
.
options
An associative array with options.
Key | Data type | Description |
---|---|---|
"compression_alg" |
string | Compression algorithm. Both
"compression_alg" and "compression_level"
must be set in order to enable data compression.
|
"compression_level" |
integer | Compression level, 0-9. 0 disables compression. |
"armor" |
boolean | Enable ASCII-armored output. Disabled by default. |
"hash" |
string | Set hash algorithm used during signature calculation. |
"creation_time" |
integer | Set signature creation time in seconds since Jan, 1 1970 UTC. By default current time is used. |
"expiration_time" |
integer | Set signature expiration time in seconds since the creation time. 0 value is used to mark signature as non-expiring (default value). |
"file_name" |
string | Set input file name.Special value _CONSOLE may be used to mark message as 'for your eyes only', i.e. it should not be stored anywhere but only displayed to the receiver. Default is the empty string. |
"file_mtime" |
integer | Set input file modification date in seconds since Jan, 1 1970 UTC. |
Data with embedded signature(s) on success or false
on failure.