summaryrefslogtreecommitdiffstats
path: root/apps/encryption/lib/Session.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/encryption/lib/Session.php')
-rw-r--r--apps/encryption/lib/Session.php10
1 files changed, 10 insertions, 0 deletions
diff --git a/apps/encryption/lib/Session.php b/apps/encryption/lib/Session.php
index 92132d6080c..a61ee25fadb 100644
--- a/apps/encryption/lib/Session.php
+++ b/apps/encryption/lib/Session.php
@@ -68,6 +68,16 @@ class Session {
}
/**
+ * check if encryption was initialized successfully
+ *
+ * @return bool
+ */
+ public function isReady() {
+ $status = $this->getStatus();
+ return $status === self::INIT_SUCCESSFUL;
+ }
+
+ /**
* Gets user or public share private key from session
*
* @return string $privateKey The user's plaintext private key