adding more helper methods to time and elliptic crypto

This commit is contained in:
Daniel Larimer 2013-08-15 19:36:54 -04:00
parent 105948ea65
commit c88ce7984e
2 changed files with 6 additions and 2 deletions

View file

@ -31,6 +31,9 @@ namespace fc {
~public_key();
bool verify( const fc::sha256& digest, const signature& sig );
public_key_data serialize()const;
operator public_key_data()const { return serialize(); }
public_key( const public_key_data& v );
public_key( const compact_signature& c, const fc::sha256& digest );

View file

@ -74,8 +74,9 @@ namespace fc {
utc_seconds = t.time_since_epoch().count() / 1000000ll;
return *this;
}
friend bool operator < ( const time_point_sec& a, const time_point_sec& b ) { return a.utc_seconds < b.utc_seconds; }
friend bool operator > ( const time_point_sec& a, const time_point_sec& b ) { return a.utc_seconds > b.utc_seconds; }
friend bool operator < ( const time_point_sec& a, const time_point_sec& b ) { return a.utc_seconds < b.utc_seconds; }
friend bool operator > ( const time_point_sec& a, const time_point_sec& b ) { return a.utc_seconds > b.utc_seconds; }
friend bool operator == ( const time_point_sec& a, const time_point_sec& b ) { return a.utc_seconds == b.utc_seconds; }
private:
uint32_t utc_seconds;