protected function prepareData($data) 
    {
        if ($data instanceof Buffer) {
            $this->data = $data;
        }
        elseif (is_string($data)) {
            $this->data = new Buffer($data); // auto-sized
        }
        elseif (is_array($data)) {
            // Uint8 provided (serialized data)
            $this->data = Buffer::fromUInt8($data);
        }
        else {
            throw new NISInvalidSignatureContent("Invalid content provided for \\NEM\\Core\\Signature object.");
        }

        return $this;
    }
protected function prepareData($data) 
    {
        if ($data instanceof Buffer) {
            $this->data = $data;
        }
        elseif (is_string($data)) {
            $this->data = new Buffer($data); // auto-sized
        }
        elseif (is_array($data)) {
            // Uint8 provided (serialized data)
            $this->data = Buffer::fromUInt8($data);
        }
        else {
            throw new NISInvalidSignatureContent("Invalid content provided for \\NEM\\Core\\Signature object.");
        }

        return $this;
    }
protected function prepareData ( $ data ) { if ( $ data instanceof Buffer ) { $ this -> data = $ data ; } elseif ( is_string ( $ data ) ) { $ this -> data = new Buffer ( $ data ) ; // auto-sized } elseif ( is_array ( $ data ) ) { // Uint8 provided (serialized data) $ this -> data = Buffer :: fromUInt8 ( $ data ) ; } else { throw new NISInvalidSignatureContent ( "Invalid content provided for \\NEM\\Core\\Signature object." ) ; } return $ this ; }
This method will prepare the given data and populate the
`data` property with a prepared and correctly sized Buffer.

@param   string|\NEM\Core\Buffer    $data         The data that needs to be signed.
@return  \NEM\Core\Signature
@throws  \NEM\Errors\NISInvalidSignatureContent      On invalid `data` argument. Should be a \NEM\Core\Buffer or a string.
This method will prepare the given data and populate the data property with a prepared and correctly sized Buffer .