Clearsign text

- « Examples

- Rnp Functions »

- PHP Manual
- Examples
- Clearsign text

## Clearsign text

This example will clearsign a given text.

Example #1 RNP clearsign example

    <?php// init FFI object$ffi = rnp_ffi_create('GPG', 'GPG');// generate RSA key$key = rnp_op_generate_key($ffi, 'test@example.com', 'RSA');// sign$data = "Example text to sign";$signature = rnp_op_sign_cleartext($ffi, $data, array($key));echo $signature;// destroy FFI objectrnp_ffi_destroy($ffi);?>