|
22 | 22 | #include "session/config/groups/keys.h" |
23 | 23 | #include "session/config/groups/members.hpp" |
24 | 24 | #include "session/multi_encrypt.hpp" |
| 25 | +#include "session/util.hpp" |
25 | 26 | #include "session/xed25519.hpp" |
26 | 27 |
|
27 | 28 | using namespace std::literals; |
@@ -657,7 +658,7 @@ Keys::swarm_auth Keys::swarm_subaccount_sign_as_user( |
657 | 658 | std::span<const unsigned char> user_ed25519_sk, |
658 | 659 | std::span<const unsigned char> msg, |
659 | 660 | std::span<const unsigned char> sign_val, |
660 | | - bool binary) const { |
| 661 | + bool binary) { |
661 | 662 | if (sign_val.size() != 100) |
662 | 663 | throw std::logic_error{"Invalid signing value: size is wrong"}; |
663 | 664 |
|
@@ -774,9 +775,13 @@ Keys::swarm_auth Keys::swarm_subaccount_sign_as_user( |
774 | 775 | } |
775 | 776 |
|
776 | 777 | Keys::swarm_auth Keys::swarm_subaccount_sign( |
777 | | - ustring_view msg, ustring_view sign_val, bool binary) const { |
| 778 | + std::span<const unsigned char> msg, |
| 779 | + std::span<const unsigned char> sign_val, |
| 780 | + bool binary) const { |
778 | 781 | auto user_ed25519_sk_buf = this->user_ed25519_sk.data(); |
779 | | - return Keys::swarm_subaccount_sign_as_user(user_ed25519_sk_buf, msg, sign_val, binary); |
| 782 | + std::span<const unsigned char> user_ed25519_sk( |
| 783 | + user_ed25519_sk_buf, this->user_ed25519_sk.size()); |
| 784 | + return Keys::swarm_subaccount_sign_as_user(user_ed25519_sk, msg, sign_val, binary); |
780 | 785 | } |
781 | 786 |
|
782 | 787 | bool Keys::swarm_verify_subaccount( |
|
0 commit comments