Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
wuriyanto48 committed Nov 17, 2022
1 parent f6e7da7 commit 9999949
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -298,4 +298,22 @@ fs.readFile('myfile.jpg', null, (err, data) => {
});
}
});
```

File Decryption with `AES 256 OCB`
```javascript
const fs = require('fs');
const { aesEncryption } = require('crypsi');

const key256 = 'abc$#128djdyAgbjau&YAnmcbagryt5x';

fs.readFile('./test/testdata/out.bin', null, (err, data) => {
if (err) {
throw err;
}

const decryptedData = aesEncryption.decryptWithAes256Ocb(key256, Buffer.from(data.toString(), 'hex'));

fs.writeFileSync('out.png', decryptedData);
});
```

0 comments on commit 9999949

Please sign in to comment.