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(); ~public_key();
bool verify( const fc::sha256& digest, const signature& sig ); bool verify( const fc::sha256& digest, const signature& sig );
public_key_data serialize()const; public_key_data serialize()const;
operator public_key_data()const { return serialize(); }
public_key( const public_key_data& v ); public_key( const public_key_data& v );
public_key( const compact_signature& c, const fc::sha256& digest ); public_key( const compact_signature& c, const fc::sha256& digest );

View file

@ -76,6 +76,7 @@ namespace fc {
} }
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: private:
uint32_t utc_seconds; uint32_t utc_seconds;