Skip to content

Instantly share code, notes, and snippets.

View kw26's full-sized avatar
๐Ÿ™ƒ

kuangwei kw26

๐Ÿ™ƒ
  • ShenZhen, China
View GitHub Profile
def sign_data(private_key_loc, data):
'''
param: private_key_loc Path to your private key
param: package Data to be signed
return: base64 encoded signature
'''
from Crypto.PublicKey import RSA
from Crypto.Signature import PKCS1_v1_5
from Crypto.Hash import SHA256
from base64 import b64encode
@kw26
kw26 / Program.cs
Created September 17, 2019 02:48 — forked from jamesmanning/Program.cs
simple TCP client and server
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net.Sockets;
using System.Text;
using System.Threading.Tasks;
namespace ConsoleApplication2
{
class Program
@kw26
kw26 / Program.cs
Created September 17, 2019 02:48 — forked from jamesmanning/Program.cs
simple TCP client and server
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net.Sockets;
using System.Text;
using System.Threading.Tasks;
namespace ConsoleApplication2
{
class Program