Giter Site home page Giter Site logo

pokemongo-encrypt-sharp's Introduction

pokemongo-encryption-sharp

Managed C# code for the Pokemon Go API request signature encryption (port of "encrypt.c")


Project contains a fully managed port of the encrypt.c code as well as a p/invoke wrapper for the native encrypt.dll binaries.

The managed lib is a PCL that targets .NET 4.5.1, ASP.NET Core, Xamarin.iOS/Android/Mac.

Both libs should work on about any mono platform. However, only the 32bit & 64bit encrypt.dll Windows binaries are included.


Sample usage

byte[] input = System.Text.Encoding.UTF8.GetBytes("Sample input data..");
byte[] iv = new byte[32];
new Random().NextBytes(iv);

// using managed lib
byte[] output = PokemonGoEncryptSharp.Util.Encrypt(input, iv);

// using native wrapper lib
byte[] output = PokemonGoEncryptNative.Util.Encrypt(input, iv);

Performance

Results from running the test app

Success! Managed code produces same output as native
Performing 3000 encryption operations with both native and managed functions...
native took 0.1162 ms per round, total: 348.63 ms
managed took 0.2669 ms per round, total: 800.9 ms
managed is 2.3 times slower

pokemongo-encrypt-sharp's People

Contributors

zone117x avatar

Stargazers

Lilac Kapul avatar Neio Zhou avatar Dennis Neufeld avatar  avatar  avatar Alvyn Velazquez avatar  avatar

Watchers

James Cloos avatar  avatar

pokemongo-encrypt-sharp's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.