Code Monkey home page Code Monkey logo

code_snippets's Introduction

code_snippets

This is where I throw potentially useful code snippets.

RSAKeyGenerator

I needed to generate and test RSA keys for my project and for so;e reason internet offered very poor answers. I made this class to serve purpose and eventually thought it would be nice to clean it and share it with people to use. Many people codes have been used so please inform me if you recognize your code so that I'd add a mention of that.

HOW TO USE IT :

  • Make a new Java project and run this code as a Java application

  • Notice code is divided into 4 blocks

  • Use them respectively to :

  • -- generate new pairs of RSA keys of desired size [It's set to 1024 keys as is]

  • -- extract xml files for those key pairs [you might want to change the format. Just reuse theinformation in this file to suit your need]

  • -- test key pairs

  • -- test xml key pairs

  • TESTING procedure :

    • generate key pair
    • provide path and file name
    • copy/past rsaencrypt/rsadecrypt blocks [as shown] to test encryption then decryption or the reverse.
  • comment all non-relevant code [only 1 in 4 up here mentioned blocks should be uncommented]

Please feel free to copy, modify and redistribute my code. Mentioning where you got would be much appreciated.

credit_card_magnet_reader

I had to enable the user to manually enter a credit card number and also be able to swipe the magnetic stripe of the card into the same field to parse the information it contains. At that time I did not find any code that did the dual reading method thing. For magnetic stripe reader I used a modified version of Wayne Walrath's "JavaScript Magstripe (track 1, track2) data parser object" (2005).

Please feel free to copy, modify and redistribute my code. Mentioning where you got would be much appreciated.

code_snippets's People

Watchers

James Cloos 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.