Nelmio\SecurityBundle\ContentSecurityPolicy\ShaComputer::__construct PHP Method

__construct() public method

public __construct ( $type )
    public function __construct($type)
    {
        if (!in_array($type, array('sha256', 'sha384', 'sha512'), true)) {
            throw new \InvalidArgumentException(sprintf('Type "%s" is not supported', $type));
        }
        $this->type = $type;
    }