aboutsummaryrefslogtreecommitdiffstats
path: root/lib/public/Security
diff options
context:
space:
mode:
Diffstat (limited to 'lib/public/Security')
-rw-r--r--lib/public/Security/IContentSecurityPolicyManager.php2
-rw-r--r--lib/public/Security/ICrypto.php4
-rw-r--r--lib/public/Security/IHasher.php4
-rw-r--r--lib/public/Security/ISecureRandom.php2
4 files changed, 6 insertions, 6 deletions
diff --git a/lib/public/Security/IContentSecurityPolicyManager.php b/lib/public/Security/IContentSecurityPolicyManager.php
index 3df0da465b2..00cdcc2c454 100644
--- a/lib/public/Security/IContentSecurityPolicyManager.php
+++ b/lib/public/Security/IContentSecurityPolicyManager.php
@@ -24,7 +24,7 @@ interface IContentSecurityPolicyManager {
* Note that the adjustment is only applied to applications that use AppFramework
* controllers.
*
- * To use this from your `app.php` use `\OC::$server->getContentSecurityPolicyManager()->addDefaultPolicy($policy)`,
+ * To use this from your `app.php` use `\OCP\Server::get(IContentSecurityPolicyManager::class)->addDefaultPolicy($policy)`,
* $policy has to be of type `\OCP\AppFramework\Http\ContentSecurityPolicy`.
*
* WARNING: Using this API incorrectly may make the instance more insecure.
diff --git a/lib/public/Security/ICrypto.php b/lib/public/Security/ICrypto.php
index c2ba4cc9c97..78b0fc14d6d 100644
--- a/lib/public/Security/ICrypto.php
+++ b/lib/public/Security/ICrypto.php
@@ -13,8 +13,8 @@ namespace OCP\Security;
* it will use the secret defined in config.php as key. Additionally the message will be HMAC'd.
*
* Usage:
- * $encryptWithDefaultPassword = \OC::$server->getCrypto()->encrypt('EncryptedText');
- * $encryptWithCustomPassword = \OC::$server->getCrypto()->encrypt('EncryptedText', 'password');
+ * $encryptWithDefaultPassword = \OCP\Server::get(ICrypto::class)->encrypt('EncryptedText');
+ * $encryptWithCustomPassword = \OCP\Server::get(ICrypto::class)->encrypt('EncryptedText', 'password');
*
* @since 8.0.0
*/
diff --git a/lib/public/Security/IHasher.php b/lib/public/Security/IHasher.php
index d985ffe48ab..d0d6e4e9028 100644
--- a/lib/public/Security/IHasher.php
+++ b/lib/public/Security/IHasher.php
@@ -19,10 +19,10 @@ namespace OCP\Security;
*
* Usage:
* // Hashing a message
- * $hash = \OC::$server->get(\OCP\Security\IHasher::class)->hash('MessageToHash');
+ * $hash = \OCP\Server::get(\OCP\Security\IHasher::class)->hash('MessageToHash');
* // Verifying a message - $newHash will contain the newly calculated hash
* $newHash = null;
- * var_dump(\OC::$server->get(\OCP\Security\IHasher::class)->verify('a', '86f7e437faa5a7fce15d1ddcb9eaeaea377667b8', $newHash));
+ * var_dump(\OCP\Server::get(\OCP\Security\IHasher::class)->verify('a', '86f7e437faa5a7fce15d1ddcb9eaeaea377667b8', $newHash));
* var_dump($newHash);
*
* @since 8.0.0
diff --git a/lib/public/Security/ISecureRandom.php b/lib/public/Security/ISecureRandom.php
index aa191ca348f..0f4a79e08e0 100644
--- a/lib/public/Security/ISecureRandom.php
+++ b/lib/public/Security/ISecureRandom.php
@@ -14,7 +14,7 @@ namespace OCP\Security;
* use a fallback.
*
* Usage:
- * \OC::$server->get(ISecureRandom::class)->generate(10);
+ * \OCP\Server::get(ISecureRandom::class)->generate(10);
*
* @since 8.0.0
*/