lib/classes/Swift/Signers/DKIMSigner.php
public function setHashAlgorithm($hash)
    {
        switch ($hash) {
            case 'rsa-sha1':
                $this->hashAlgorithm = 'rsa-sha1';
                break;
            case 'rsa-sha256':
                $this->hashAlgorithm = 'rsa-sha256';
                if (!defined('OPENSSL_ALGO_SHA256')) {
                    throw new Swift_SwiftException('Unable to set sha256 as it is not supported by OpenSSL.');
                }
                break;
            default:
                throw new Swift_SwiftException('Unable to set the hash algorithm, must be one of rsa-sha1 or rsa-sha256 (%s given).', $hash);
        }

        return $this;
    }
public function setHashAlgorithm($hash)
    {
        switch ($hash) {
            case 'rsa-sha1':
                $this->hashAlgorithm = 'rsa-sha1';
                break;
            case 'rsa-sha256':
                $this->hashAlgorithm = 'rsa-sha256';
                if (!defined('OPENSSL_ALGO_SHA256')) {
                    throw new Swift_SwiftException('Unable to set sha256 as it is not supported by OpenSSL.');
                }
                break;
            default:
                throw new Swift_SwiftException('Unable to set the hash algorithm, must be one of rsa-sha1 or rsa-sha256 (%s given).', $hash);
        }

        return $this;
    }
public function setHashAlgorithm ( $ hash ) { switch ( $ hash ) { case 'rsa-sha1' : $ this -> hashAlgorithm = 'rsa-sha1' ; break ; case 'rsa-sha256' : $ this -> hashAlgorithm = 'rsa-sha256' ; if ( ! defined ( 'OPENSSL_ALGO_SHA256' ) ) { throw new Swift_SwiftException ( 'Unable to set sha256 as it is not supported by OpenSSL.' ) ; } break ; default : throw new Swift_SwiftException ( 'Unable to set the hash algorithm, must be one of rsa-sha1 or rsa-sha256 (%s given).' , $ hash ) ; } return $ this ; }
Set hash_algorithm, must be one of rsa-sha256 | rsa-sha1.

@param string $hash 'rsa-sha1' or 'rsa-sha256'

@throws Swift_SwiftException

@return $this
Set hash_algorithm must be one of rsa - sha256 | rsa - sha1 .