patch-encfs_test_cpp 682 B

12345678910111213141516171819202122
  1. $OpenBSD: patch-encfs_test_cpp,v 1.1.1.1 2014/01/17 10:10:58 stsp Exp $
  2. --- encfs/test.cpp.orig Thu Jan 16 14:11:17 2014
  3. +++ encfs/test.cpp Thu Jan 16 14:11:44 2014
  4. @@ -65,7 +65,7 @@ int checkErrorPropogation( const shared_ptr<Cipher> &c
  5. for(int i=0; i<size; ++i)
  6. {
  7. - unsigned char tmp = rand();
  8. + unsigned char tmp = arc4random();
  9. orig.data[i] = tmp;
  10. data.data[i] = tmp;
  11. }
  12. @@ -81,7 +81,7 @@ int checkErrorPropogation( const shared_ptr<Cipher> &c
  13. unsigned char previousValue = data.data[byteToChange];
  14. do
  15. {
  16. - data.data[byteToChange] = rand();
  17. + data.data[byteToChange] = arc4random();
  18. } while(data.data[byteToChange] == previousValue);
  19. }