I have a chat application built in Java. The chat app stores a log of the user Jimmy's chats locally on his machine.

I want this chat log to be encrypted so if someone uses the computer (authorized or unauthorized) he cannot simply read all of Jimmy's chats. I would like Jimmy's chats to only be readable when Jimmy is logged in. As soon as he logs out, the chats should be encrypted and unreadable. 

Any ideas on how this sort of scheme could be implemented?

In order to block Tor, all that has to be done is have the current list of Tor nodes which can be found at the following link:

http://torstatus.blutmagie.de/ip_list_all.php/Tor_ip_list_ALL.csv

and then block them bi-directionally via the Routers or Firewalls. 

That said there will be numerous ways around such efforts, people can still use VPNs to connect outside of a given area and then run the Tor traffic from another location or tunnel the traffic through, but this will effectively block many of the less technical people from accessing Tor.

Similarly, the following list of Tor exit nodes could be useful for blocking Tor traffic from connecting to any given websites:
https://check.torproject.org/exit-addresses

I would say it's easy to make Tor hard to use but that it's extremely hard to make it impossible to use. 

Keep in mind that governments with large financial resources can spend money to run tools like ZMAP.io to find potential Tor servers, including Tor Bridges, minutes after they are started. Continuously scanning the entire IPv4 address space has become trivial for those with even a small budget so a campaign to find and block Tor nodes could easily be very effective, but it will never be absolute. 

Finally, keep in mind that once Tor users have been identified the government would likely monitor future connections by that user to locate new Tor bridges or similar connections.

Note: The task of scanning IPv4 has become trivial but the process for scanning all of the public IPv6 address space would be radically unmanageable due to the scale. That said a large government project correlating other types of data such as Netflow, some type of traffic signatures, or some other form of identification would be required to identify and block Tor traffic on IPv6 networks. 

Again governments can make Tor hard to use but that it's extremely hard to make it impossible to use.

It should be further noted that governments also leverage additional tactics to identify anonymous users. To protect end-users from risks related to cookies or other signatures which may give away additional information about Tor users it may be wise to use an anonymous live CD such as the following:

https://www.whonix.org/

https://tails.boum.org/

Torflow visualization may also be of interest:

https://torflow.uncharted.software

Related article: 81% of Tor Users Can be Easily Unmasked By Analyzing Router Information

http://thehackernews.com/2014/11/81-of-tor-users-can-be-easily-unmasked_18.html

Another related article about a much more dangerous but related issue: Tor Browser Exposed

https://hackernoon.com/tor-browser-exposed-anti-privacy-implantation-at-mass-scale-bd68e9eb1e95
