Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

test that length of encrypted data == length of raw data #282

Merged

Conversation

Lagovas
Copy link
Collaborator

@Lagovas Lagovas commented Jan 17, 2018

tested python/C tests, but didn't check locally php version update. but ci should test it

@Lagovas Lagovas requested a review from vixentael January 17, 2018 17:51
@vixentael
Copy link
Contributor

New test checks are always welcomed! Cool that we will check message length now

@vixentael vixentael added W-PHPThemis 🐘 Wrapper: PHPThemis, PHP API W-PyThemis 🐍 Wrapper: PyThemis, Python API W-ThemisPP ⚔️ Wrapper: ThemisPP, C++ API core Themis Core written in C, its packages tests Themis test suite and removed W-ThemisPP ⚔️ Wrapper: ThemisPP, C++ API labels Jan 17, 2018
@vixentael
Copy link
Contributor

Google tells me that it should be count($arr) for php

@@ -100,6 +100,7 @@ public function testTokenProtectWithContext($key, $message, $context, $iscorrect
$this->setExpectedException('Exception');
}
$encrypted_message = phpthemis_scell_token_protect_encrypt($key, $message, $context);
$this->assertEquals(strlen($encrypted_message), strlen($message));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

count?

@vixentael vixentael merged commit e4efcb3 into cossacklabs:master Jan 18, 2018
@Lagovas Lagovas deleted the lagovas/add-token-protect-test-case branch February 6, 2018 14:46
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
core Themis Core written in C, its packages tests Themis test suite W-PHPThemis 🐘 Wrapper: PHPThemis, PHP API W-PyThemis 🐍 Wrapper: PyThemis, Python API
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants