// uses empty salt & empty IV static byte[] aesEncrypt(byte[] data, S password) ctex { SecretKey secret = crypto_makeAESKey(password, crypto_emptySalt()); Cipher cipher = Cipher.getInstance("AES/CBC/PKCS5Padding"); cipher.init(Cipher.ENCRYPT_MODE, secret, crypto_emptyIV()); ret crypto_cipherBytes(cipher, data); }
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: | 544 / 553 |
Referenced in: | #1005125 - aesDecrypt #1005127 - aesEncryptString #1006654 - Standard functions list 2 (LIVE, continuation of #761) |