php8.5
Home/ Manual/ rnp / functions/ rnp_op_sign_detached

rnp_op_sign_detached

PHP function Edit on GitHub ✎

(PECL rnp >= 0.1.1)

Perform signing operation, return detached signature(s)

Description

rnp_op_sign_detached(RnpFFI $ffi, string $data, array $keys_fp, [array $options]): string|false

Parameters

ffi

Ffi-description

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.

KeyData typeDescription
"armor"booleanEnable ASCII-armored output. Disabled by default.
"hash"stringSet hash algorithm used during signature calculation.
"creation_time"integerSet signature creation time in seconds since Jan, 1 1970 UTC. By default current time is used.
"expiration_time"integerSet signature expiration time in seconds since the creation time. 0 value is used to mark signature as non-expiring (default value).

Return Values

Detached signature(s) data on successFalseforfailure.

Source: reference/rnp/functions/rnp-op-sign-detached.xml · from the official PHP manual (php/doc-en)