GithubHelp home page GithubHelp logo

scottmac / crypto-request-examples Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ptarjan/crypto-request-examples

4.0 2.0 0.0 112 KB

A collection of samples for validating and decrypting signed and encrypted requests from Facebook.

Home Page: http://developers.facebook.com/docs/authentication/canvas/encryption_proposal

Shell 6.69% Ruby 10.42% Python 10.63% JavaScript 13.07% Java 20.20% PHP 38.98%

crypto-request-examples's Introduction

signed & encrypted requests

Provides samples for decoding signed and encrypted requests in a few different languages. To run the tests:

./test.sh

Note, you'll likely need to ensure some extensions are available in your environment.

Python

Requires PyCrypto. To install, run:

 easy_install pycrypto

Ruby

You will need a build of Ruby with OpenSSL support. Additionally, you'll need JSON. To install, run

 gem install json

Java

Java requires these libraries:

If you see a exception along the lines of java.security.InvalidKeyException: Illegal key size, you may need to get the right policy files to allow the use of AES-256 encryption. The policy files are available here.

PHP

You'll need these extensions:

If these aren't installed, then your script will fail with a message like:

 Fatal error: Call to undefined function mcrypt_create_iv()

If they aren't activated but are present on your system, you can try to activate them by adding these lines to your php.ini file:

extension=mcrypt.so

If that doesn't work (gives as "Unable to load dynamic library" error), then you'll need to recompile PHP with the extensions included or install the extension using your system package manager.

crypto-request-examples's People

Contributors

daaku avatar ptarjan avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

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.