src/MediaServices/MediaServicesRestProxy.php
public function rebindContentKey($contentKey, $x509Certificate)
    {
        $contentKeyId = Utilities::getEntityId(
            $contentKey,
            'WindowsAzure\MediaServices\Models\ContentKey'
        );
        $contentKeyId = urlencode($contentKeyId);

        $x509Certificate = urlencode($x509Certificate);

        $method = Resources::HTTP_GET;
        $headers = [];
        $postParams = [];
        $queryParams = [];
        $statusCode = Resources::STATUS_OK;
        $path = "RebindContentKey?id='{$contentKeyId}'".
            "&x509Certificate='{$x509Certificate}'";

        $response = $this->sendHttp(
            $method,
            $headers,
            $queryParams,
            $postParams,
            $path,
            $statusCode
        );

        $key = (string) simplexml_load_string($response->getBody());

        return base64_decode($key);
    }
public function rebindContentKey($contentKey, $x509Certificate)
    {
        $contentKeyId = Utilities::getEntityId(
            $contentKey,
            'WindowsAzure\MediaServices\Models\ContentKey'
        );
        $contentKeyId = urlencode($contentKeyId);

        $x509Certificate = urlencode($x509Certificate);

        $method = Resources::HTTP_GET;
        $headers = [];
        $postParams = [];
        $queryParams = [];
        $statusCode = Resources::STATUS_OK;
        $path = "RebindContentKey?id='{$contentKeyId}'".
            "&x509Certificate='{$x509Certificate}'";

        $response = $this->sendHttp(
            $method,
            $headers,
            $queryParams,
            $postParams,
            $path,
            $statusCode
        );

        $key = (string) simplexml_load_string($response->getBody());

        return base64_decode($key);
    }
public function rebindContentKey ( $ contentKey , $ x509Certificate ) { $ contentKeyId = Utilities :: getEntityId ( $ contentKey , 'WindowsAzure\MediaServices\Models\ContentKey' ) ; $ contentKeyId = urlencode ( $ contentKeyId ) ; $ x509Certificate = urlencode ( $ x509Certificate ) ; $ method = Resources :: HTTP_GET ; $ headers = [ ] ; $ postParams = [ ] ; $ queryParams = [ ] ; $ statusCode = Resources :: STATUS_OK ; $ path = "RebindContentKey?id='{$contentKeyId}'" . "&x509Certificate='{$x509Certificate}'" ; $ response = $ this -> sendHttp ( $ method , $ headers , $ queryParams , $ postParams , $ path , $ statusCode ) ; $ key = ( string ) simplexml_load_string ( $ response -> getBody ( ) ) ; return base64_decode ( $ key ) ; }
Rebind ContentKey.

@param ContentKey|string $contentKey            An ContentKey data or ContentKey Id
@param string            $x509Certificate X.509 certificate (with only the public key) that was used to encrypt
the clear storage encryption/common protection content keys

@return string Content key
Rebind ContentKey .