Changeset 11172 in vbox for trunk/src/VBox/Runtime/common
- Timestamp:
- Aug 6, 2008 3:27:28 AM (17 years ago)
- svn:sync-xref-src-repo-rev:
- 34169
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/common/rand/rand.cpp
r11126 r11172 125 125 if (offLast == UINT32_MAX) 126 126 /* get 4 random bytes and return them raw. */ 127 rtRandGenBytes(&u.ab , sizeof(u.off));127 rtRandGenBytes(&u.ab[0], sizeof(u.off)); 128 128 else if (!(offLast & UINT32_C(0xf0000000))) 129 129 { 130 130 /* get 4 random bytes and do simple squeeze. */ 131 rtRandGenBytes(&u.ab , sizeof(u.off));131 rtRandGenBytes(&u.ab[0], sizeof(u.off)); 132 132 u.off %= offLast + 1; 133 133 u.off += u32First; … … 136 136 { 137 137 /* get 5 random bytes and do shifted squeeze. (this ain't perfect) */ 138 rtRandGenBytes(&u.ab , sizeof(u.ab));138 rtRandGenBytes(&u.ab[0], sizeof(u.ab)); 139 139 u.off %= (offLast >> 4) + 1; 140 140 u.off <<= 4; … … 204 204 if (offLast == UINT64_MAX) 205 205 /* get 8 random bytes and return them raw. */ 206 rtRandGenBytes(&u.ab , sizeof(u.off));206 rtRandGenBytes(&u.ab[0], sizeof(u.off)); 207 207 else if (!(offLast & UINT64_C(0xf000000000000000))) 208 208 { 209 209 /* get 8 random bytes and do simple squeeze. */ 210 rtRandGenBytes(&u.ab , sizeof(u.off));210 rtRandGenBytes(&u.ab[0], sizeof(u.off)); 211 211 u.off %= offLast + 1; 212 212 u.off += u64First; … … 215 215 { 216 216 /* get 9 random bytes and do shifted squeeze. (this ain't perfect) */ 217 rtRandGenBytes(&u.ab , sizeof(u.ab));217 rtRandGenBytes(&u.ab[0], sizeof(u.ab)); 218 218 u.off %= (offLast >> 4) + 1; 219 219 u.off <<= 4;
Note:
See TracChangeset
for help on using the changeset viewer.