Merge remote-tracking branch 'origin/master' into dbkr/wasm

This commit is contained in:
David Baker 2018-10-01 16:14:39 +01:00
commit b51d75392b
2 changed files with 2 additions and 2 deletions

View file

@ -72,7 +72,7 @@ info.
Advancing the chain key
~~~~~~~~~~~~~~~~~~~~~~~
Advancing a chain key takes the previous chain key, :math:`C_{i,j-i}`. The next
Advancing a chain key takes the previous chain key, :math:`C_{i,j-1}`. The next
chain key, :math:`C_{i,j}`, is the HMAC-SHA-256_ of ``"\x02"`` using the
previous chain key as the key.

View file

@ -189,7 +189,7 @@ size_t olm_pk_generate_key(
void * pubkey, size_t pubkey_length,
void * random, size_t random_length
) {
if (pubkey_length < CURVE25519_KEY_LENGTH) {
if (pubkey_length < olm_pk_key_length()) {
decryption->last_error =
OlmErrorCode::OLM_OUTPUT_BUFFER_TOO_SMALL;
return std::size_t(-1);