private function getModulus($keyResource) { $keyDetails = openssl_pkey_get_details($keyResource); return strtoupper(bin2hex($keyDetails['rsa']['n'])); }