# File lib/ramaze/helper/httpdigest.rb, line 53
      def httpdigest_lookup(username, realm)
        if block_given?
          yield(username)
        elsif respond_to?(:httpdigest_lookup_password)
          httpdigest_lookup_password(username)
        elsif respond_to?(:httpdigest_lookup_plaintext_password)
          plain = httpdigest_lookup_plaintext_password(username)
          Digest::MD5.hexdigest([username, realm, plain].join(':'))
        else
          raise "No password lookup handler found"
        end
      end