$str.evpSign

Returns a signature for a message created using your certificate's private key
Usage
$str.evpSign(<message>[,<certificate>[,<password>]])
Description
This function returns a base64-encoded signature string created signing the provided <message> using the private key of the specified <certificate>.
If the <certificate> parameter is omitted, the private key specified in the kvirc options will be used.
If any error occurs, this function will return an empty string.
Syntax Specification
<string> $str.evpSign(<message:string>[,<certificate:string>[,<password:string>]])
Examples

    # Emulate a call with no parameters
    %message="test message";
    %pcert=$file.read($option(stringSSLPrivateKeyPath));
    %sign=$str.evpSign(%message,%pcert,$option(stringSSLPrivateKeyPass));

    # Sign and verify the signature using the certificates from options
    %message="test message";
    %sign=$str.evpSign(%message);
    if($str.evpVerify(%message, %sign))
    {
        echo "signature is valid";
    } else {
        echo "signature is not valid";
    }

See also
$str.evpverify $certificate $dcc.getsslcertinfo

Index, Functions
KVIrc 4.2.0.6190 Documentation
Generated by builduser at Thu May 18 22:40:02 2017