aboutsummaryrefslogtreecommitdiffstats
path: root/apps/encryption/tests/Crypto
Commit message (Collapse)AuthorAgeFilesLines
* refactor(apps): Use constructor property promotion when possibleprovokateurin2024-10-213-11/+11
| | | | Signed-off-by: provokateurin <kate@provokateurin.de>
* chore(apps): Apply new rector configuration to autouse classesCôme Chilliet2024-10-153-14/+17
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* test: Fix wrongly mocked methodJoas Schilling2024-10-071-2/+1
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* chore: Apply rector configuration to apps folderCôme Chilliet2024-09-201-2/+2
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* fix: Remove OCP\Files\Storage interface deprecated since version 9Côme Chilliet2024-09-161-4/+4
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* refactor: Add void return type to PHPUnit test methodsChristoph Wurst2024-09-154-40/+40
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* style: update codestyle for coding-standard 1.2.3Daniel Kesselberg2024-08-253-29/+29
| | | | Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
* test: Fix encryption testLouis Chemineau2024-06-061-21/+14
| | | | Signed-off-by: Louis Chemineau <louis@chmn.me>
* chore: Add SPDX headerAndy Scherzinger2024-05-294-91/+16
| | | | Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
* fix(CS): Fix coding styleJoas Schilling2024-01-261-1/+1
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* fix(encryption): Fix deprecated syntax in encryption testsFerdinand Thiessen2024-01-261-1/+7
| | | | Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
* chore: apply changes from Nextcloud coding standards 1.1.1Joas Schilling2023-11-231-1/+1
| | | | | Signed-off-by: Joas Schilling <coding@schilljs.com> Signed-off-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
* Migrate away from ILogger in encryptionCôme Chilliet2023-08-082-6/+6
| | | | | | And modernize code a bit Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Adapt encryption test to change in generateHeaderCôme Chilliet2023-05-251-1/+1
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* fix: Adjust console formatter code to match with Symfony type hintsFerdinand Thiessen2023-04-171-1/+4
| | | | | | | Symfony has added type hints on the `OutputFormatterInterface`, so we must adjust our type hints to match with Symfony. Signed-off-by: Ferdinand Thiessen <rpm@fthiessen.de>
* Merge pull request #36351 from ↵Joas Schilling2023-04-141-0/+8
|\ | | | | | | | | nextcloud/bugfix/noid/move-encryption-password-email-to-template Move encrypt-all password email to EmailTemplate
| * Fix unit testsJoas Schilling2023-03-081-0/+8
| | | | | | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* | Add a test for multiKeyEncrypt/Decrypt methodsCôme Chilliet2023-03-201-4/+15
| | | | | | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* | Adapt code to new encryption systemCôme Chilliet2023-03-171-3/+3
|/ | | | | | | | | fileKey gets deleted upon save as it’s stored in shareKeys instead now. We use presence of a fileKey to detect if a file is using the legacy system or the new one, because we do not always have access to header data. Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Replace getSystemValue in encryption appJ0WI2022-12-051-5/+5
| | | | Signed-off-by: J0WI <J0WI@users.noreply.github.com>
* Remove at() matcher use from encryption testsCôme Chilliet2022-05-241-15/+20
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Save encrypted files in binary formatplumbeo2022-05-041-9/+14
| | | | | | | | | | | | | Default to the more space-efficient binary encoding for newly encrypted files instead of the traditional base64 encoding, eliminating the 33% overhead. The new option 'encryption.use_legacy_encoding' allows to force the legacy encoding format if needed. Files encoded in the old format remain readable. Based on https://github.com/owncloud/encryption/pull/224 and https://github.com/owncloud/core/pull/38249 by karakayasemi. Signed-off-by: plumbeo <plumbeo@users.noreply.github.com>
* Fix tests on PHP 8.1 for encryption, files_sharing, files_version,Côme Chilliet2021-12-161-1/+4
| | | | | | files_trashbin and theming apps Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Update php licensesJohn Molakvoæ (skjnldsv)2021-06-044-4/+0
| | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* Fix testMorris Jobke2021-05-201-1/+1
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Format code to a single space around binary operatorsChristoph Wurst2020-10-052-4/+4
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Make legacy cipher opt inRoeland Jago Douma2020-08-191-0/+10
| | | | | | | | * Systems that upgrade have this enabled by default * New systems disable it * We'll have to add some wargning in the setup checks if this is enabled Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Change PHPDoc type hint from PHPUnit_Framework_MockObject_MockObject to ↵Morris Jobke2020-08-124-38/+38
| | | | | | \PHPUnit\Framework\MockObject\MockObject Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Update license headers for 19Christoph Wurst2020-04-291-0/+1
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Format control structures, classes, methods and functionChristoph Wurst2020-04-104-25/+1
| | | | | | | | | | | | | | | To continue this formatting madness, here's a tiny patch that adds unified formatting for control structures like if and loops as well as classes, their methods and anonymous functions. This basically forces the constructs to start on the same line. This is not exactly what PSR2 wants, but I think we can have a few exceptions with "our" style. The starting of braces on the same line is pracrically standard for our code. This also removes and empty lines from method/function bodies at the beginning and end. Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Unify function spacing to PSR2 recommendationChristoph Wurst2020-04-093-7/+7
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Use exactly one empty line after the namespace declarationChristoph Wurst2020-04-093-3/+0
| | | | | | For PSR2 Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Update the license headers for Nextcloud 19Christoph Wurst2020-03-312-0/+2
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Use the short array syntax, everywhereChristoph Wurst2020-03-262-55/+55
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Use the shorter phpunit syntax for mocked return valuesChristoph Wurst2020-03-251-2/+2
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Update license headersChristoph Wurst2019-12-054-5/+6
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Mode to modern phpunitRoeland Jago Douma2019-11-274-12/+16
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Make phpunit8 compatibleRoeland Jago Douma2019-11-274-4/+4
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Some php-cs fixesRoeland Jago Douma2019-11-224-4/+1
| | | | | | | | | | | * Order the imports * No leading slash on imports * Empty line before namespace * One line per import * Empty after imports * Emmpty line at bottom of file Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Remove deprecated functions from SecureRandomRoeland Jago Douma2018-12-071-2/+0
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* skip already encrypted files on encrypt all commandBjoern Schiessle2018-10-241-0/+33
| | | | Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
* Class "ProgressBar" is declared "final" and cannot be mocked.Joas Schilling2018-01-251-2/+4
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Update license headersMorris Jobke2017-11-064-0/+10
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Use ::class in test mocks of encryption appMorris Jobke2017-10-264-28/+45
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Use ::class in test mocksMorris Jobke2017-10-243-9/+18
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* print generated encryption key passwords directly after generating the keys ↵Kenneth Newwood2017-09-111-2/+2
| | | | | | so that errors during the encryption do not lead to a potentially massive data loss Signed-off-by: Kenneth Newwood <kenneth@newwood.name>
* Update comments to NextcloudMorris Jobke2017-04-111-1/+1
| | | | | | | * based on PR by @Ardinis * see #4311 Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* always throw a encryption exceptionBjoern Schiessle2017-03-141-1/+1
| | | | Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
* check if session is initializedBjoern Schiessle2016-11-231-0/+15
| | | | Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
* Fix getMock encryptionRoeland Jago Douma2016-09-063-4/+8
|