Ejemplo n.º 1
0
        public static int OTP(int id, OTPMinuteTypes type)
        {
            var dt = DateTime.Now;

            return((id * 1001) ^ ((dt.Day * 100 + dt.Month) * 100 + dt.Hour) * 10 + FindNumberKey(dt.Minute, (int)type));
        }
Ejemplo n.º 2
0
        public static int RetrievalOTP(int otp, OTPMinuteTypes type)
        {
            var dt = DateTime.Now;

            return((otp ^ (((dt.Day * 100 + dt.Month) * 100 + dt.Hour) * 10 + FindNumberKey(dt.Minute, (int)type))) / 1001);
        }