maint(cryptography): reduce code generation by at least 3 asm instructions
😱
This commit is contained in:
parent
dd10c8e347
commit
5d1c0f7a59
@ -240,7 +240,7 @@ namespace utils::cryptography
|
||||
return {cs(buffer), length};
|
||||
}
|
||||
|
||||
return "";
|
||||
return {};
|
||||
}
|
||||
|
||||
std::string ecc::key::get_openssl() const
|
||||
@ -253,7 +253,7 @@ namespace utils::cryptography
|
||||
return {cs(buffer), length};
|
||||
}
|
||||
|
||||
return "";
|
||||
return {};
|
||||
}
|
||||
|
||||
void ecc::key::set_openssl(const std::string& key)
|
||||
@ -313,7 +313,7 @@ namespace utils::cryptography
|
||||
|
||||
std::string ecc::sign_message(const key& key, const std::string& message)
|
||||
{
|
||||
if (!key.is_valid()) return "";
|
||||
if (!key.is_valid()) return {};
|
||||
|
||||
uint8_t buffer[512];
|
||||
unsigned long length = sizeof(buffer);
|
||||
@ -408,7 +408,6 @@ namespace utils::cryptography
|
||||
rsa_free(&new_key);
|
||||
});
|
||||
|
||||
|
||||
std::string out_data{};
|
||||
out_data.resize(std::max(ul(data.size() * 3), ul(0x100)));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user