Changeset 3446
- Timestamp:
- Nov 21, 2012 12:10:28 AM (6 months ago)
- File:
-
- 1 edited
-
cpu/x86/pc/olpc/oatstime.fth (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
cpu/x86/pc/olpc/oatstime.fth
r3445 r3446 317 317 " flush-writes" $call-http 318 318 ; 319 [ifndef] random-long 320 variable rn 321 : random-long rn @ d# 1103515245 * d# 12345 + h# 7FFFFFFF and dup rn ! ; 322 time&date >unix-seconds get-msecs xor rn ! 319 320 [ifdef] random 321 alias nonce-int random-long 322 [else] 323 : nonce-int ( -- n ) time&date >unix-seconds get-msecs xor ; 323 324 [then] 325 324 326 0 value the-nonce 325 327 : oats-msg$ ( -- msg$ ) 326 random-longabs dup to the-nonce ( nonce )328 nonce-int abs dup to the-nonce ( nonce ) 327 329 " SN" find-tag 0= abort" Machine has no serial number" ?-null ( nonce sn$ ) 328 330 " serialnum=%s&version=1&nonce=%d" sprintf
Note: See TracChangeset
for help on using the changeset viewer.
