static protected function getComputedSignature($secretPassphrase, $hashAlgorithm)
    {
        switch ($hashAlgorithm) {
            case HashAlgorithm::SHA256:
                $computedSignature = hash(HashAlgorithm::SHA256, static::getStringToCompute($secretPassphrase));
                break;
            case HashAlgorithm::SHA512 :
                $computedSignature = hash(HashAlgorithm::SHA512, static::getStringToCompute($secretPassphrase));
                break;
            default:
                $computedSignature = sha1(static::getStringToCompute($secretPassphrase));
                break;
        }

        return $computedSignature;
    }
static protected function getComputedSignature($secretPassphrase, $hashAlgorithm)
    {
        switch ($hashAlgorithm) {
            case HashAlgorithm::SHA256:
                $computedSignature = hash(HashAlgorithm::SHA256, static::getStringToCompute($secretPassphrase));
                break;
            case HashAlgorithm::SHA512 :
                $computedSignature = hash(HashAlgorithm::SHA512, static::getStringToCompute($secretPassphrase));
                break;
            default:
                $computedSignature = sha1(static::getStringToCompute($secretPassphrase));
                break;
        }

        return $computedSignature;
    }
static protected function getComputedSignature ( $ secretPassphrase , $ hashAlgorithm ) { switch ( $ hashAlgorithm ) { case HashAlgorithm :: SHA256 : $ computedSignature = hash ( HashAlgorithm :: SHA256 , static :: getStringToCompute ( $ secretPassphrase ) ) ; break ; case HashAlgorithm :: SHA512 : $ computedSignature = hash ( HashAlgorithm :: SHA512 , static :: getStringToCompute ( $ secretPassphrase ) ) ; break ; default : $ computedSignature = sha1 ( static :: getStringToCompute ( $ secretPassphrase ) ) ; break ; } return $ computedSignature ; }
Compute signature according to hash and passphrase

@param string $secretPassphrase
@param string $hashAlgorithm

@return string
Compute signature according to hash and passphrase