Skip to content

Commit

Permalink
Rename assert_rsa_sha1_assert to assert_rsa_sha1
Browse files Browse the repository at this point in the history
  • Loading branch information
smlu committed Dec 12, 2023
1 parent 8bcdd4d commit 6db0f74
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 58 deletions.
6 changes: 3 additions & 3 deletions examples/helloack/src/helloack.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ void helloack::check_ecdsa_secp256r1_sha256(bytes_view qx, bytes_view qy, bytes_
void helloack::check_rsa_sha1(rsa_public_key_view pubkey, bytes_view msg, bytes_view sig)
{
auto md = eosio::sha1( reinterpret_cast<const char*>( msg.data() ), msg.size() );
assert_rsa_sha1_assert( pubkey, md, sig,
assert_rsa_sha1( pubkey, md, sig,
"RSA PKCS v1.5 SHA-1 signature verification failed"
);
}
Expand Down Expand Up @@ -92,7 +92,7 @@ void helloack::check_rsa_pss_sha512(rsa_pss_public_key_view pubkey, bytes_view m
void helloack::bt_rsa_1024_sha1()
{
constexpr auto pubkey = rsa_public_key_view( rsa_1024_sha1::mod, rsa_1024_sha1::exp );
assert_rsa_sha1_assert( pubkey, rsa_1024_sha1::md, rsa_1024_sha1::sig,
assert_rsa_sha1( pubkey, rsa_1024_sha1::md, rsa_1024_sha1::sig,
"RSA 1024 PKCS v1.5 SHA-1 signature verification failed"
);
}
Expand All @@ -101,7 +101,7 @@ void helloack::bt_rsa_1024_sha1()
void helloack::bt_rsa_2048_sha1()
{
constexpr auto pubkey = rsa_public_key_view( rsa_2048_sha1::mod, rsa_2048_sha1::exp );
assert_rsa_sha1_assert( pubkey, rsa_2048_sha1::md, rsa_2048_sha1::sig,
assert_rsa_sha1( pubkey, rsa_2048_sha1::md, rsa_2048_sha1::sig,
"RSA 2048 PKCS v1.5 SHA-1 signature verification failed"
);
}
Expand Down
2 changes: 1 addition & 1 deletion include/ack/rsa.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ namespace ack {
* @param signature - RSA PKCS1 v1.5 signature
* @param error - error message to use when verification fails
*/
inline void assert_rsa_sha1_assert(const rsa_public_key_view& pub_key, const hash160& digest, const bytes_view& signature, const char* error) {
inline void assert_rsa_sha1(const rsa_public_key_view& pub_key, const hash160& digest, const bytes_view& signature, const char* error) {
eosio::check( verify_rsa_sha1( pub_key, digest, signature ), error );
}

Expand Down
Loading

0 comments on commit 6db0f74

Please sign in to comment.