#include using namespace std ; const int SecondsPerMinute = 60 ; const int SecondsPerHour = 3600 ; const int SecondsPerDay = 86400 ; const int DaysOfMonth [ 12 ] = { 31 , 28 , 31 , 30 , 31 , 30 , 31 , 31 , 30 , 31 , 30 , 31 } ; bool IsLeapYear ( short year ) { if ( year % 4 != 0 ) return false ; if ( year % 100 != 0 ) return true ; return ( year % 400 ) == 0 ; } time_t mkgmtime ( short year , short month , short day , short hour , short minute , short second ) { time_t secs = 0 ; for ( short y = 1970 ; y < year ; ++ y ) secs += ( IsLeapYear ( y ) ? 366 : 365 ) * SecondsPerDay ; for ( short m = 1 ; m < month ; ++ m ) { secs += DaysOfMonth [ m - 1 ] * SecondsPerDay ; if ( m == 2 && IsLeapYear ( year ) ) secs += SecondsPerDay ; } secs += ( day - 1 ) * SecondsPerDay ; secs += hour * SecondsPerHour ; secs += minute * SecondsPerMinute ; secs += second ; return secs ; } int main ( ) { time_t seed = mkgmtime ( 2024 , 5 , 1 , 5 , 41 , 7 ) ; unsigned int d = ( ( unsigned int * ) & seed ) [ 0 ] ; srand ( d ) ; char bytes [ 65 ] ; for ( int x = 0 ; x < 64 ; x ++ ) { bytes [ x ] = rand ( ) % 26 + 65 ; } bytes [ 64 ] = 0 ; printf ( "%s\n" , bytes ) ; return 0 ; }