Update: There is a more secure version available. Details
<?php
$plaintext = 'My secret message 1234';
Update: There is a more secure version available. Details
<?php
$plaintext = 'My secret message 1234';
public class SimpleJSON { | |
public static Object toJSON(Object object) throws JSONException { | |
if (object instanceof HashMap) { | |
JSONObject json = new JSONObject(); | |
HashMap map = (HashMap) object; | |
for (Object key : map.keySet()) { | |
json.put(key.toString(), toJSON(map.get(key))); | |
} | |
return json; |
import java.net.URL; | |
import java.security.SecureRandom; | |
import java.security.cert.CertificateException; | |
import java.security.cert.X509Certificate; | |
import javax.net.ssl.HostnameVerifier; | |
import javax.net.ssl.HttpsURLConnection; | |
import javax.net.ssl.KeyManager; | |
import javax.net.ssl.SSLContext; | |
import javax.net.ssl.SSLSession; | |
import javax.net.ssl.TrustManager; |
#Update your package. | |
$ sudo apt-get update | |
$ sudo apt-get install apache2 | |
# Open up the main configuration file with your text edit: | |
ServerName server_domain_or_IP | |
$ sudo systemctl restart apache2 |
#!/bin/bash | |
export DEBIAN_FRONTEND=noninteractive | |
# General utils | |
sudo apt-get -y update | |
sudo apt-get -y upgrade | |
sudo apt-get -y install unzip | |
sudo apt-get -y install software-properties-common python-software-properties |