Minor spelling fix
This commit is contained in:
parent
cb66666edd
commit
36baae683e
2 changed files with 24 additions and 24 deletions
|
|
@ -40,7 +40,7 @@ namespace fc {
|
||||||
|
|
||||||
public_key( const public_key_data& v );
|
public_key( const public_key_data& v );
|
||||||
public_key( const public_key_point_data& v );
|
public_key( const public_key_point_data& v );
|
||||||
public_key( const compact_signature& c, const fc::sha256& digest, bool check_cannonical = true );
|
public_key( const compact_signature& c, const fc::sha256& digest, bool check_canonical = true );
|
||||||
|
|
||||||
bool valid()const;
|
bool valid()const;
|
||||||
public_key mult( const fc::sha256& offset );
|
public_key mult( const fc::sha256& offset );
|
||||||
|
|
|
||||||
|
|
@ -481,7 +481,7 @@ namespace fc { namespace ecc {
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
public_key::public_key( const compact_signature& c, const fc::sha256& digest, bool check_cannonical )
|
public_key::public_key( const compact_signature& c, const fc::sha256& digest, bool check_canonical )
|
||||||
{
|
{
|
||||||
int nV = c.data[0];
|
int nV = c.data[0];
|
||||||
if (nV<27 || nV>=35)
|
if (nV<27 || nV>=35)
|
||||||
|
|
@ -491,12 +491,12 @@ namespace fc { namespace ecc {
|
||||||
BN_bin2bn(&c.data[1],32,sig->r);
|
BN_bin2bn(&c.data[1],32,sig->r);
|
||||||
BN_bin2bn(&c.data[33],32,sig->s);
|
BN_bin2bn(&c.data[33],32,sig->s);
|
||||||
|
|
||||||
if( check_cannonical )
|
if( check_canonical )
|
||||||
{
|
{
|
||||||
FC_ASSERT( !(c.data[1] & 0x80), "signature is not cannonical" );
|
FC_ASSERT( !(c.data[1] & 0x80), "signature is not canonical" );
|
||||||
FC_ASSERT( !(c.data[1] == 0 && !(c.data[2] & 0x80)), "signature is not cannonical" );
|
FC_ASSERT( !(c.data[1] == 0 && !(c.data[2] & 0x80)), "signature is not canonical" );
|
||||||
FC_ASSERT( !(c.data[33] & 0x80), "signature is not cannonical" );
|
FC_ASSERT( !(c.data[33] & 0x80), "signature is not canonical" );
|
||||||
FC_ASSERT( !(c.data[33] == 0 && !(c.data[34] & 0x80)), "signature is not cannonical" );
|
FC_ASSERT( !(c.data[33] == 0 && !(c.data[34] & 0x80)), "signature is not canonical" );
|
||||||
}
|
}
|
||||||
|
|
||||||
my->_key = EC_KEY_new_by_curve_name(NID_secp256k1);
|
my->_key = EC_KEY_new_by_curve_name(NID_secp256k1);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue