protected static function getConsumerKey($key)
    {

        $len = strlen($key);
        if ($len > 255) {
            $key = 'sha512:' . hash('sha512', $key);
        }

        return $key;

    }
protected static function getConsumerKey($key)
    {

        $len = strlen($key);
        if ($len > 255) {
            $key = 'sha512:' . hash('sha512', $key);
        }

        return $key;

    }
protected static function getConsumerKey ( $ key ) { $ len = strlen ( $ key ) ; if ( $ len > 255 ) { $ key = 'sha512:' . hash ( 'sha512' , $ key ) ; } return $ key ; }
Return a hash of a consumer key for values longer than 255 characters.

@param string $key
@return string
Return a hash of a consumer key for values longer than 255 characters .