lib/bagit_manifest.php
public function setHashEncoding($hashEncoding)
    {
        $this->hashEncoding = $hashEncoding;

        $fileName = preg_replace(
            '/-\w+\.txt$/',
            "-$hashEncoding.txt",
            $this->fileName
        );

        if ($fileName != $this->fileName) {
            rename($this->fileName, $fileName);
            $this->fileName = $fileName;
        }
    }
public function setHashEncoding($hashEncoding)
    {
        $this->hashEncoding = $hashEncoding;

        $fileName = preg_replace(
            '/-\w+\.txt$/',
            "-$hashEncoding.txt",
            $this->fileName
        );

        if ($fileName != $this->fileName) {
            rename($this->fileName, $fileName);
            $this->fileName = $fileName;
        }
    }
public function setHashEncoding ( $ hashEncoding ) { $ this -> hashEncoding = $ hashEncoding ; $ fileName = preg_replace ( '/-\w+\.txt$/' , "-$hashEncoding.txt" , $ this -> fileName ) ; if ( $ fileName != $ this -> fileName ) { rename ( $ this -> fileName , $ fileName ) ; $ this -> fileName = $ fileName ; } }
This sets the hash encoding.

@param string $hashEncoding This sets the encoding to use when creating
the manifest hash data. This must be either 'md5' or 'sha1'; however, it
does not test for this.

@return void
This sets the hash encoding .