call the right function and remove unnecessary include
This commit is contained in:
parent
621097f62b
commit
48dda7922d
2 changed files with 3 additions and 5 deletions
|
@ -301,7 +301,7 @@ PkSigning.prototype['init_with_seed'] = restore_stack(function (seed) {
|
||||||
var seed_buffer = stack(seed.length);
|
var seed_buffer = stack(seed.length);
|
||||||
Module['HEAPU8'].set(seed, seed_buffer);
|
Module['HEAPU8'].set(seed, seed_buffer);
|
||||||
|
|
||||||
var pubkey_length = pk_decryption_method(
|
var pubkey_length = pk_signing_method(
|
||||||
Module['_olm_pk_sign_public_key_length']
|
Module['_olm_pk_sign_public_key_length']
|
||||||
)();
|
)();
|
||||||
var pubkey_buffer = stack(pubkey_length + NULL_BYTE_PADDING_LENGTH);
|
var pubkey_buffer = stack(pubkey_length + NULL_BYTE_PADDING_LENGTH);
|
||||||
|
@ -319,7 +319,7 @@ PkSigning.prototype['init_with_seed'] = restore_stack(function (seed) {
|
||||||
});
|
});
|
||||||
|
|
||||||
PkSigning.prototype['generate_seed'] = restore_stack(function () {
|
PkSigning.prototype['generate_seed'] = restore_stack(function () {
|
||||||
var random_length = pk_decryption_method(
|
var random_length = pk_signing_method(
|
||||||
Module['_olm_pk_sign_seed_length']
|
Module['_olm_pk_sign_seed_length']
|
||||||
)();
|
)();
|
||||||
var random_buffer = random_stack(random_length);
|
var random_buffer = random_stack(random_length);
|
||||||
|
@ -342,7 +342,7 @@ PkSigning.prototype['sign'] = restore_stack(function (message) {
|
||||||
message_buffer = malloc(message_length + 1);
|
message_buffer = malloc(message_length + 1);
|
||||||
stringToUTF8(message, message_buffer, message_length + 1);
|
stringToUTF8(message, message_buffer, message_length + 1);
|
||||||
|
|
||||||
var sig_length = pk_decryption_method(
|
var sig_length = pk_signing_method(
|
||||||
Module['_olm_pk_signature_length']
|
Module['_olm_pk_signature_length']
|
||||||
)();
|
)();
|
||||||
var sig_buffer = stack(sig_length + NULL_BYTE_PADDING_LENGTH);
|
var sig_buffer = stack(sig_length + NULL_BYTE_PADDING_LENGTH);
|
||||||
|
|
|
@ -473,8 +473,6 @@ size_t olm_pk_signature_length() {
|
||||||
return olm::encode_base64_length(ED25519_SIGNATURE_LENGTH);
|
return olm::encode_base64_length(ED25519_SIGNATURE_LENGTH);
|
||||||
}
|
}
|
||||||
|
|
||||||
#include "olm/utility.hh"
|
|
||||||
|
|
||||||
size_t olm_pk_sign(
|
size_t olm_pk_sign(
|
||||||
OlmPkSigning *signing,
|
OlmPkSigning *signing,
|
||||||
uint8_t const * message, size_t message_length,
|
uint8_t const * message, size_t message_length,
|
||||||
|
|
Loading…
Reference in a new issue