This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private void btnDecrypt_Click(object sender, EventArgs e) | |
{ | |
byte[] data = Convert.FromBase64String(textBox4.Text); // decrypt the incrypted text | |
using (MD5CryptoServiceProvider md5 = new MD5CryptoServiceProvider()) | |
{ | |
byte[] keys = md5.ComputeHash(UTF8Encoding.UTF8.GetBytes(hash)); | |
using (TripleDESCryptoServiceProvider tripDes = new TripleDESCryptoServiceProvider() { Key = keys, Mode = CipherMode.ECB, Padding = PaddingMode.PKCS7 }) | |
{ | |
ICryptoTransform transform = tripDes.CreateDecryptor(); | |
byte[] results = transform.TransformFinalBlock(data, 0, data.Length); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections; | |
using UnityEngine; | |
using PaulKevin; | |
public class Baccarat_BetBoard : MonoBehaviour | |
{ | |
//[SerializeField] protected GameObject[] prefab_big_road = null; | |
//[SerializeField] Transform[] pos_big_road = null; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using System; | |
using System.IO; | |
using LitJson; | |
public class StreetUtility | |
{ | |
// Parsing 1 (Unity default parser). | |
public static string ToJson<T>(T requestObject) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// do encrytion | |
function aes_encrypt(message,crypt_key) | |
{ | |
var w = new Array( 44 ); // subkey information | |
var state = new Array( 16 ); // working state | |
var round; | |
msg=get_value(message,true); | |
key=get_value(crypt_key,false); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using UnityEditor; | |
public class EditorCameraControls : EditorWindow | |
{ | |
[MenuItem("Tools/EditorCameraControls")] | |
private static void Init() | |
{ | |
GetWindow<EditorCameraControls>(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//inside class | |
Vector2 firstPressPos; | |
Vector2 secondPressPos; | |
Vector2 currentSwipe; | |
public void Swipe() | |
{ | |
if(Input.GetMouseButtonDown(0)) | |
{ | |
//save began touch 2d point |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using System; | |
using System.Collections; | |
using System.IO; | |
using System.Text; | |
using System.Security.Cryptography; | |
namespace PreviewLabs | |
{ | |
public static class PlayerPrefs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class CommandLine{ | |
static string CurrentDate = ""; | |
const string szReleasePath = "../RELEASE/ANDROID/GOOGLEPLAY/"; | |
private static string MoveResource(string szOrigin, string szDest){ | |
string szApplicationDataPath = Application.dataPath; | |
if(szOrigin.Contains(szApplicationDataPath)){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//ANDROID PLATFORM | |
string json = null; | |
string full_path = Application.streamingAssetsPath + "filename"; | |
// Android only use WWW to read file | |
WWW reader = new WWW(full_path); | |
//wait until the download is done | |
while (!reader.isDone){} | |
json = reader.text; |
NewerOlder