Skip to content

Instantly share code, notes, and snippets.

@fbongcam
Last active January 11, 2024 12:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fbongcam/516fb740284beaebfada36c65fc52631 to your computer and use it in GitHub Desktop.
Save fbongcam/516fb740284beaebfada36c65fc52631 to your computer and use it in GitHub Desktop.
Simple request code generator
import java.util.Date;
public class RequestCodeGenerator {
public RequestCodeGenerator() {}
public int getCode() {
long timestamp = new Date().getTime();
return Math.abs( (int) timestamp % 100000 );
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment