src/Secrets.php
static public function getDefaultKeyName(Config $conf = null) {
        $locationId = "global";
        if (is_null($conf)) {
            $projectId = self::getProjectId();
            $keyRingId = self::getKeyRingId();
            $cryptoKeyId = self::getCryptoKeyId();
        } else {
            $projectId = $conf->get(self::CONF_PROJECT_ID_NAME);
            $keyRingId = $conf->get(self::CONF_KEYRING_ID_NAME);
            $cryptoKeyId = $conf->get(self::CONF_KEY_ID_NAME);
        }
        return self::getKeyName($projectId, $locationId, $keyRingId, $cryptoKeyId);
    }
static public function getDefaultKeyName(Config $conf = null) {
        $locationId = "global";
        if (is_null($conf)) {
            $projectId = self::getProjectId();
            $keyRingId = self::getKeyRingId();
            $cryptoKeyId = self::getCryptoKeyId();
        } else {
            $projectId = $conf->get(self::CONF_PROJECT_ID_NAME);
            $keyRingId = $conf->get(self::CONF_KEYRING_ID_NAME);
            $cryptoKeyId = $conf->get(self::CONF_KEY_ID_NAME);
        }
        return self::getKeyName($projectId, $locationId, $keyRingId, $cryptoKeyId);
    }
static public function getDefaultKeyName ( Config $ conf = null ) { $ locationId = "global" ; if ( is_null ( $ conf ) ) { $ projectId = self :: getProjectId ( ) ; $ keyRingId = self :: getKeyRingId ( ) ; $ cryptoKeyId = self :: getCryptoKeyId ( ) ; } else { $ projectId = $ conf -> get ( self :: CONF_PROJECT_ID_NAME ) ; $ keyRingId = $ conf -> get ( self :: CONF_KEYRING_ID_NAME ) ; $ cryptoKeyId = $ conf -> get ( self :: CONF_KEY_ID_NAME ) ; } return self :: getKeyName ( $ projectId , $ locationId , $ keyRingId , $ cryptoKeyId ) ; }
Support passing the config object directly.

@param Config|null $conf
@return string
Support passing the config object directly .