Local decrypt the encrypted string relevant time inconsistency on another computer

Problem scenario:

Local encryption when:

var a=DateTime.Now.date;

Var c = string of encryption + a

Another decryption

var b = a is calculated according to

Encrypted string var d = + b

Situation appears to c ≠ d

 

The reason: Inconsistent time format two computers, leading to inconsistent results encrypted

Solution

The time before encrypting the same string formatted

var a=DateTime.Now.date.ToString("yyyy-MM-dd")

 

 

 

Guess you like

Origin www.cnblogs.com/sugarwxx/p/11880389.html