Skip to content

Instantly share code, notes, and snippets.

View reza-khalafi's full-sized avatar

reza reza-khalafi

  • Iran
View GitHub Profile
@KushtrimPacaj
KushtrimPacaj / AesEncryptDecrypt.java
Last active May 31, 2024 01:21
AES encryption in Java, equivalent of Crypt ( Encrypter.php class ) on Laravel (PHP)
import android.util.Base64;
import android.util.Log;
import com.google.gson.Gson;
import org.apache.commons.codec.binary.Hex;
import java.io.UnsupportedEncodingException;
import java.security.GeneralSecurityException;
import java.security.Key;
import java.util.Arrays;
import javax.crypto.Cipher;
import javax.crypto.Mac;