diff options
author | Hubert Chathi <hubert@uhoreg.ca> | 2018-10-05 14:52:01 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-10-05 14:52:01 -0400 |
commit | f6e3f7f44aef5bb84173e87869928bd9922aaf96 (patch) | |
tree | 6a731e04faf57c703124f337c5c2723d4ec243f6 /javascript/olm_pk.js | |
parent | e521ee84c5a96f478c6d9b10e90edb47549baf5f (diff) | |
parent | 173339ae9accddd184bc83f2c23c5ffae3b08d00 (diff) |
Merge branch 'master' into dbkr/pk_private_export_import
Diffstat (limited to 'javascript/olm_pk.js')
-rw-r--r-- | javascript/olm_pk.js | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/javascript/olm_pk.js b/javascript/olm_pk.js index 2212470..4f730dd 100644 --- a/javascript/olm_pk.js +++ b/javascript/olm_pk.js @@ -51,7 +51,7 @@ PkEncryption.prototype['encrypt'] = restore_stack(function( )(this.ptr); var mac_buffer = stack(mac_length + NULL_BYTE_PADDING_LENGTH); setValue( - mac_buffer+mac_length, + mac_buffer + mac_length, 0, "i8" ); var ephemeral_length = pk_encryption_method( @@ -59,7 +59,7 @@ PkEncryption.prototype['encrypt'] = restore_stack(function( )(); var ephemeral_buffer = stack(ephemeral_length + NULL_BYTE_PADDING_LENGTH); setValue( - ephemeral_buffer+ephemeral_length, + ephemeral_buffer + ephemeral_length, 0, "i8" ); pk_encryption_method(Module['_olm_pk_encrypt'])( @@ -73,7 +73,7 @@ PkEncryption.prototype['encrypt'] = restore_stack(function( // UTF8ToString requires a null-terminated argument, so add the // null terminator. setValue( - ciphertext_buffer+ciphertext_length, + ciphertext_buffer + ciphertext_length, 0, "i8" ); return { @@ -139,7 +139,7 @@ PkDecryption.prototype['generate_key'] = restore_stack(function () { Module['_olm_pk_private_key_length'] )(); var random_buffer = random_stack(random_length); - var pubkey_length = pk_encryption_method( + var pubkey_length = pk_decryption_method( Module['_olm_pk_key_length'] )(); var pubkey_buffer = stack(pubkey_length + NULL_BYTE_PADDING_LENGTH); @@ -219,7 +219,7 @@ PkDecryption.prototype['decrypt'] = restore_stack(function ( // UTF8ToString requires a null-terminated argument, so add the // null terminator. setValue( - plaintext_buffer+plaintext_length, + plaintext_buffer + plaintext_length, 0, "i8" ); return UTF8ToString(plaintext_buffer); |