Last active
January 11, 2024 12:52
-
-
Save fbongcam/516fb740284beaebfada36c65fc52631 to your computer and use it in GitHub Desktop.
Simple request code generator
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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