1 | // uses empty salt & empty IV |
2 | static byte[] aesEncrypt(byte[] data, S password) ctex { |
3 | SecretKey secret = crypto_makeAESKey(password, crypto_emptySalt()); |
4 | Cipher cipher = Cipher.getInstance("AES/CBC/PKCS5Padding"); |
5 | cipher.init(Cipher.ENCRYPT_MODE, secret, crypto_emptyIV()); |
6 | ret crypto_cipherBytes(cipher, data); |
7 | } |
download show line numbers debug dex old transpilations
Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, ddnzoavkxhuk, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1005124 |
Snippet name: | aesEncrypt |
Eternal ID of this version: | #1005124/1 |
Text MD5: | 30eea7c862c442e7ef2846bb8983b415 |
Author: | stefan |
Category: | javax / cryptography |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2016-10-16 21:11:04 |
Source code size: | 330 bytes / 7 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 543 / 552 |
Referenced in: | [show references] |