public function setContentData(string $data): self
    {
        $this->contentData = $data;
        $this->contentLength = strlen($this->contentData);
        $extraLength = $this->contentLength % 8;
        $this->paddingLength = $extraLength ? (8 - $extraLength) : 0;
        return $this;
    }
public function setContentData(string $data): self
    {
        $this->contentData = $data;
        $this->contentLength = strlen($this->contentData);
        $extraLength = $this->contentLength % 8;
        $this->paddingLength = $extraLength ? (8 - $extraLength) : 0;
        return $this;
    }
public function setContentData ( string $ data ) : self { $ this -> contentData = $ data ; $ this -> contentLength = strlen ( $ this -> contentData ) ; $ extraLength = $ this -> contentLength % 8 ; $ this -> paddingLength = $ extraLength ? ( 8 - $ extraLength ) : 0 ; return $ this ; }
Sets the content data and adjusts the length fields

@param string $data

@return static
Sets the content data and adjusts the length fields