Update CsrfGuard.java

Added some utility functions.