private function assertValidHashAlgorithm(KeyConfiguration $keyConfig)
    {
        if (!\in_array($keyConfig->getHashAlgorithm(), hash_algos(), true)) {
            throw new UnknownHashAlgorithmException($keyConfig->getHashAlgorithm());
        }
    }