Re: Synchronizing on File Formating
"Frank Pilhofer" <[email protected]>
| Newsgroups | gmane.comp.security.passwordsafe.devel |
|---|---|
| Message-ID | <[email protected]> |
On Wed, 27 Jul 2005 13:00:31 -0400, Wolfgang Keller <[email protected]> wrote: > > A. Timestamp values > Can this be true? [format-v2.txt]: > > "Timestamps will be stored as 32 bit, little endian, unsigned integers, > representing the number of seconds since Midnight, January 1, 1970, > GMT. (This is equivalent to the time_t type on Windows and POSIX." > > As I understood "time_t" type, it is a long integer showing > milliseconds, not seconds. I'ld be happy with a "second" granularity in > pws files (it makes the format 1000-year prove!) but the format > definition should be made consistent. > Hi Wolfgang, No, both Windows and POSIX define time_t to be in seconds, exactly as defined above. On the Macintosh, time_t is also in seconds, but using a different epoch, starting in 1904. So, on the Macintosh, you need to adjust by 2082844800 seconds, if you intend to use the ISO C functions for time conversion (such as localtime()). As a side note, ISO C does not define the format of time_t, so an implementation that used millisecond values would be ISO C compliant, just not POSIX compliant. > > B. Password Life Time > It is open in format definition whether this field expresses a timepoint > or a time span. I assume the former. > > --> I am using an "epoch" timepoint for values > IIRC, no implementation supports this field yet, so go ahead, make a decision, and document it. My preference for this field would be a time difference in seconds. That would make the field independent of the last modification time. E.g., it could be 90*86400 if the password expired after 90 days. > > D. Unicode Option > > --> I use UTF-8 text field interpretation if and only if there is a > substring "B 24 1" in the options string > Right. Frank -- Frank Pilhofer, [email protected] ------------------------------------------------------- SF.Net email is Sponsored by the Better Software Conference & EXPO September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf