Skip to content

Instantly share code, notes, and snippets.

View smutneja03's full-sized avatar

Sahil Mutneja smutneja03

View GitHub Profile
@smutneja03
smutneja03 / VerhoeffValidator.java
Created April 1, 2017 07:45
Algorithm to check whether an aadhaar number is valid or not
public class VerhoeffValidator {
/**
* @see <a href="http://en.wikipedia.org/wiki/Verhoeff_algorithm/">More
* Info</a>
* @see <a href="http://en.wikipedia.org/wiki/Dihedral_group">Dihedral
* Group</a>
* @see <a href="http://mathworld.wolfram.com/DihedralGroupD5.html">Dihedral
* Group Order 10</a>
* @author Colm Rice
*/
@smutneja03
smutneja03 / HmacUtil.class
Created April 1, 2017 07:21
HMAC Util for packet encryption and to prevent message tampering
package in.co.teni.service.banking.util;
import java.io.IOException;
import java.math.BigDecimal;
import java.security.GeneralSecurityException;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import javax.crypto.Mac;
import javax.crypto.spec.SecretKeySpec;
@smutneja03
smutneja03 / accordionSample.html
Created March 17, 2016 07:25
Code Snippet for Accordion built on top of Bootstrap. Javascript functionality added via adding data-* attributes to HTML which is a part of Bootstrap Javascript Plugin.
<div class='panel-group'>
<div class='panel panel-success'>
<div class='panel-heading'>
<h4 class='panel-title'>
<a data-toggle='collapse' data-parent='.panel-group' href='#systemsOperational'>All Systems Operational</a>
</h4>
</div>
<div id='systemsOperational' class='panel-collapse collapse in'>
<div class='panel-body'>
@smutneja03
smutneja03 / navbarSample.html
Created March 17, 2016 07:12
Responsive Navigation Bar built on top of Bootstrap
<header class='navbar navbar-default navbar-static-top'>
<nav class='container' role='navigation'>
<div class='navbar-header'>
<a href='index.html' class='navbar-brand'>Blasting Off With Bootstrap</a>
<button type='button' class='navbar-toggle collapsed' data-toggle='collapse' data-target='.navbar-collapse'>
<span class='sr-only'>Toggle navigation</span>
<span class='icon-bar'></span>
<span class='icon-bar'></span>
<span class='icon-bar'></span>