CascadiaPHP 2024

Clearsign text

This example will clearsign a given text.

例1 RNP clearsign example

// init FFI object
$ffi = rnp_ffi_create('GPG', 'GPG');

// generate RSA key
$key = rnp_op_generate_key($ffi, '', 'RSA');

// sign
$data = "Example text to sign";
$signature = rnp_op_sign_cleartext($ffi, $data, array($key));


// destroy FFI object
add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top