rnp_op_sign_cleartext

(PECL rnp >= 0.1.1)

rnp_op_sign_cleartextPerform signing operation on a textual data, return cleartext signed message

Descripción

rnp_op_sign_cleartext(
    RnpFFI$ffi,
    string$data,
    array$keys_fp,
    array$options = ?
): string|false

Parámetros

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.

KeyData typeDescripción
"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).

Valores devueltos

Cleartext signed message containing source data with additional headers and ASCII-armored signature on success o false en caso de error.

To Top