Reference · Documents and pages · lib.rs
protect_file Function
No description yet.
func protectFile(input: Data, password: String) throws -> Datapublic static byte[] ProtectFile(byte[] input, string password)pub fn protect_file(input: Vec<u8>, password: String) -> Result<Vec<u8>, PagewerkError>Parameters
| Name | Type | Swift / C# |
|---|---|---|
input | Vec<u8> | input |
password | String | password |
Returns
Vec<u8>
Errors
Throws PagewerkError:
Unreadable: “unreadable: {message}”Refused: “refused: {message}”WrongPassword: “wrong password”
Signatures are generated from the engine’s code. Swift is checked against the generated bindings; C# follows the bindings generator’s naming rules.
Live demo
Engine 0.1.0-e9147c0 · runs in this browser, your file never leaves itSamples:
text-8-pages.pdfText, 8 pages, 10 KB