diff --git a/src/Facades/System.php b/src/Facades/System.php index b420368..088ce1d 100644 --- a/src/Facades/System.php +++ b/src/Facades/System.php @@ -7,6 +7,9 @@ /** * @method static bool canPromptTouchID() * @method static bool promptTouchID(string $reason) + * @method static bool canEncrypt() + * @method static string encrypt(string $string) + * @method static string decrypt(string $string) * @method static array printers() * @method static void print(string $html, ?\Native\Laravel\DataObjects\Printer $printer = null) * @method static string printToPDF(string $reason) diff --git a/src/System.php b/src/System.php index 5535368..b6c7e07 100644 --- a/src/System.php +++ b/src/System.php @@ -22,6 +22,25 @@ public function promptTouchID(string $reason): bool ])->successful(); } + public function canEncrypt(): bool + { + return $this->client->get('system/can-encrypt')->json('result'); + } + + public function encrypt(string $string): ?string + { + return $this->client->post('system/encrypt', [ + 'string' => $string, + ])->json('result'); + } + + public function decrypt(string $string): ?string + { + return $this->client->post('system/decrypt', [ + 'string' => $string, + ])->json('result'); + } + /** * @return array<\Native\Laravel\DataObjects\Printer> */