Skip to content

Commit fd0752b

Browse files
committed
Add safe storage methods
1 parent 6d7b038 commit fd0752b

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

src/System.php

+19
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,25 @@ public function promptTouchID(string $reason): bool
2222
])->successful();
2323
}
2424

25+
public function canEncrypt(): bool
26+
{
27+
return $this->client->get('system/can-encrypt')->json('result');
28+
}
29+
30+
public function encrypt(string $string): string
31+
{
32+
$this->client->post('system/encrypt', [
33+
'string' => $string,
34+
])->json('result');
35+
}
36+
37+
public function decrypt(string $string): string
38+
{
39+
$this->client->post('system/decrypt', [
40+
'string' => $string,
41+
])->json('result');
42+
}
43+
2544
/**
2645
* @return array<\Native\Laravel\DataObjects\Printer>
2746
*/

0 commit comments

Comments
 (0)