Wire Sysio Wire Sysion 1.0.0
Loading...
Searching...
No Matches
fc::crypto::hash_visitor Struct Reference
Inheritance diagram for fc::crypto::hash_visitor:
Collaboration diagram for fc::crypto::hash_visitor:

Public Member Functions

template<typename SigType >
size_t operator() (const SigType &sig) const
 
size_t operator() (const webauthn::signature &sig) const
 

Detailed Description

Definition at line 6 of file signature.cpp.

Member Function Documentation

◆ operator()() [1/2]

template<typename SigType >
size_t fc::crypto::hash_visitor::operator() ( const SigType & sig) const
inline

Definition at line 8 of file signature.cpp.

8 {
9 static_assert(sizeof(sig._data.data) == 65, "sig size is expected to be 65");
10 //signatures are two bignums: r & s. Just add up least significant digits of the two
11 return *(size_t*)&sig._data.data[32-sizeof(size_t)] + *(size_t*)&sig._data.data[64-sizeof(size_t)];
12 }

◆ operator()() [2/2]

size_t fc::crypto::hash_visitor::operator() ( const webauthn::signature & sig) const
inline

Definition at line 14 of file signature.cpp.

14 {
15 return sig.get_hash();
16 }
Here is the call graph for this function:

The documentation for this struct was generated from the following file: