Verify Permissions
diskutil verifyPermissions /
Repair Permissions
diskutil repairPermissions /
| /** | |
| * Método responsável pela verificação da conexão com a internet | |
| * @return | |
| */ | |
| public boolean isOnline() { | |
| try { | |
| ConnectivityManager cm = (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE); | |
| NetworkInfo netInfo = cm.getActiveNetworkInfo(); | |
| return netInfo != null && netInfo.isConnectedOrConnecting(); | |
| } |
| import android.support.annotation.Nullable; | |
| import android.util.Base64; | |
| import java.nio.ByteBuffer; | |
| import java.security.SecureRandom; | |
| import javax.crypto.Cipher; | |
| import javax.crypto.spec.IvParameterSpec; | |
| import javax.crypto.spec.SecretKeySpec; |
| <?php | |
| /** | |
| * simple method to encrypt or decrypt a plain text string | |
| * initialization vector(IV) has to be the same when encrypting and decrypting | |
| * | |
| * @param string $action: can be 'encrypt' or 'decrypt' | |
| * @param string $string: string to encrypt or decrypt | |
| * | |
| * @return string | |
| */ |