File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change 22using Microsoft . AspNetCore . Mvc ;
33using Microsoft . EntityFrameworkCore ;
44using OpenShock . API . Models . Requests ;
5- using OpenShock . API . Services ;
65using OpenShock . Common . Authentication . Attributes ;
76using OpenShock . Common . Constants ;
87using OpenShock . Common . Errors ;
1211using OpenShock . Common . Redis ;
1312using OpenShock . Common . Utils ;
1413using System . Net . Mime ;
14+ using System . Security . Cryptography ;
1515using OpenShock . API . Services . DeviceUpdate ;
1616using Redis . OM ;
1717
@@ -208,7 +208,7 @@ public async Task<IActionResult> GetPairCode([FromRoute] Guid deviceId)
208208 if ( ! deviceExists ) return Problem ( HubError . HubNotFound ) ;
209209 await _redis . Connection . UnlinkAsync ( $ "{ typeof ( DevicePair ) . FullName } :{ deviceId } ") ;
210210
211- string pairCode = CryptoUtils . RandomNumericString ( 6 ) ;
211+ string pairCode = RandomNumberGenerator . GetInt32 ( 100000 , 1000000 ) . ToString ( ) ;
212212
213213 var devicePairDto = new DevicePair
214214 {
You can’t perform that action at this time.
0 commit comments