src/OwpDkim.inc.php
static protected function generateKeys()
    {

        $config = array(
            "digest_alg"       => "sha256",
            "private_key_bits" => 1024,
            "private_key_type" => OPENSSL_KEYTYPE_RSA,
        );

        // Create the keypair
        $res = openssl_pkey_new($config);

        // Get private key
        openssl_pkey_export($res, $privatekey);

        // Get public key
        $publickey = openssl_pkey_get_details($res);

        return array(
            "privatekey" => (string) $privatekey,
            "publickey"  => (string) $publickey["key"],
        );

    }
static protected function generateKeys()
    {

        $config = array(
            "digest_alg"       => "sha256",
            "private_key_bits" => 1024,
            "private_key_type" => OPENSSL_KEYTYPE_RSA,
        );

        // Create the keypair
        $res = openssl_pkey_new($config);

        // Get private key
        openssl_pkey_export($res, $privatekey);

        // Get public key
        $publickey = openssl_pkey_get_details($res);

        return array(
            "privatekey" => (string) $privatekey,
            "publickey"  => (string) $publickey["key"],
        );

    }
generateKeys

@method generateKeys()
@access private
@return array

@author  Brian Tafoya
@version 1.0