def METHOD_NAME():
    class Root:
        @cherrypy.expose
        def index(self):
            return 'This is public.'
    class DigestProtected:
        @cherrypy.expose
        def index(self, *args, **kwargs):
            return "Hello %s, you've been authorized." % (
                cherrypy.request.login)
    conf = {'/digest': {'tools.auth_digest.on': True,
                        'tools.auth_digest.realm': 'localhost',
                        'tools.auth_digest.get_ha1': get_ha1,
                        'tools.auth_digest.key': 'a565c27146791cfb',
                        'tools.auth_digest.debug': True,
                        'tools.auth_digest.accept_charset': 'UTF-8'}}
    root = Root()
    root.digest = DigestProtected()
    cherrypy.tree.mount(root, config=conf)