Well, it is something we want in the documentation (more information in #2042). It is easier to do it now than doing it later, what will cost us a lot of time we should put into documentation new features.

**Xml**

    <security:config>
        <firewall name="somename">
            <http-digest key="a_random_string" realm="secure-api" />
        </firewall>
    </security:config>

**Php**

    $container->loadFromExtension('security', array(
        'firewalls' => array(
            'somename' => array(
                'http_digest' => array(
                    'key'   => 'a_random_string',
                    'realm' => 'secure-api',
                ),
            ),
        ),
    ));