Unverified Commit c58207e0 authored by svetaro's avatar svetaro

SKALE-1594 Add constant ECDSA_ENCR_LEN

parent e69460f5
......@@ -72,7 +72,7 @@ std::vector<std::string> ecdsa_sign_hash(const char* encryptedKeyHex, const char
std::cerr << "encrypted len" << dec_len << std::endl;
status = ecdsa_sign1(eid, &err_status, errMsg, encr_key, 625, (unsigned char*)hashHex, signature_r, signature_s, signature_v, base );
status = ecdsa_sign1(eid, &err_status, errMsg, encr_key, ECDSA_ENCR_LEN, (unsigned char*)hashHex, signature_r, signature_s, signature_v, base );
std::cerr << "signature r in ecdsa_sign_hash "<< signature_r << std::endl;
std::cerr << "signature s in ecdsa_sign_hash "<< signature_s << std::endl;
......
......@@ -31,6 +31,7 @@
#define ECDSA_SKEY_LEN 65
#define ECDSA_SKEY_BASE 16
#define ECDSA_ENCR_LEN 625
#define UNKNOWN_ERROR -1
#define PLAINTEXT_KEY_TOO_LONG -2
......
......@@ -521,9 +521,9 @@ TEST_CASE("API test", "[api_test]") {
cerr << "Client inited" << endl;
try {
// cout << c.generateECDSAKey("known_key1") << endl;
cout << c.generateECDSAKey("known_key1") << endl;
//cout<<c.getPublicECDSAKey("test_key");
cout << c.ecdsaSignMessageHash(10, "known_key1","3F891FDA3704F0368DAB65FA81EBE616F4AA2A0854995DA4DC0B59D2CADBD64F" );
//cout << c.ecdsaSignMessageHash(16, "known_key1","3F891FDA3704F0368DAB65FA81EBE616F4AA2A0854995DA4DC0B59D2CADBD64F" );
} catch (JsonRpcException &e) {
cerr << e.what() << endl;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment