summaryrefslogtreecommitdiffstats
path: root/tests/lib/Security/CryptoTest.php
diff options
context:
space:
mode:
authorChristoph Wurst <christoph@winzerhof-wurst.at>2020-04-10 16:51:06 +0200
committerChristoph Wurst <christoph@winzerhof-wurst.at>2020-04-10 16:51:06 +0200
commit1584c9ae9c23d2a7915750ef9203cba0bcebf766 (patch)
tree568db931f631afd6e96772cf2b3ac539c989ec42 /tests/lib/Security/CryptoTest.php
parenta7c8d26d31cb1cf69e0e060c53622e545fcfbbb3 (diff)
downloadnextcloud-server-1584c9ae9c23d2a7915750ef9203cba0bcebf766.tar.gz
nextcloud-server-1584c9ae9c23d2a7915750ef9203cba0bcebf766.zip
Add visibility to all methods and position of static keyword
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'tests/lib/Security/CryptoTest.php')
-rw-r--r--tests/lib/Security/CryptoTest.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/lib/Security/CryptoTest.php b/tests/lib/Security/CryptoTest.php
index 2a2e6adac3e..a6f4902594a 100644
--- a/tests/lib/Security/CryptoTest.php
+++ b/tests/lib/Security/CryptoTest.php
@@ -30,13 +30,13 @@ class CryptoTest extends \Test\TestCase {
/**
* @dataProvider defaultEncryptionProvider
*/
- function testDefaultEncrypt($stringToEncrypt) {
+ public function testDefaultEncrypt($stringToEncrypt) {
$ciphertext = $this->crypto->encrypt($stringToEncrypt);
$this->assertEquals($stringToEncrypt, $this->crypto->decrypt($ciphertext));
}
- function testWrongPassword() {
+ public function testWrongPassword() {
$this->expectException(\Exception::class);
$this->expectExceptionMessage('HMAC does not match.');
@@ -45,14 +45,14 @@ class CryptoTest extends \Test\TestCase {
$this->crypto->decrypt($ciphertext, 'A wrong password!');
}
- function testLaterDecryption() {
+ public function testLaterDecryption() {
$stringToEncrypt = 'Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt.';
$encryptedString = '44a35023cca2e7a6125e06c29fc4b2ad9d8a33d0873a8b45b0de4ef9284f260c6c46bf25dc62120644c59b8bafe4281ddc47a70c35ae6c29ef7a63d79eefacc297e60b13042ac582733598d0a6b4de37311556bb5c480fd2633de4e6ebafa868c2d1e2d80a5d24f9660360dba4d6e0c8|lhrFgK0zd9U160Wo|a75e57ab701f9124e1113543fd1dc596f21e20d456a0d1e813d5a8aaec9adcb11213788e96598b67fe9486a9f0b99642c18296d0175db44b1ae426e4e91080ee';
$this->assertEquals($stringToEncrypt, $this->crypto->decrypt($encryptedString, 'ThisIsAVeryS3cur3P4ssw0rd'));
}
- function testWrongIV() {
+ public function testWrongIV() {
$this->expectException(\Exception::class);
$this->expectExceptionMessage('HMAC does not match.');
@@ -61,7 +61,7 @@ class CryptoTest extends \Test\TestCase {
}
- function testWrongParameters() {
+ public function testWrongParameters() {
$this->expectException(\Exception::class);
$this->expectExceptionMessage('Authenticated ciphertext could not be decoded.');