From 56d4e22852706da26a8f22fd004df2046a3c3a9f Mon Sep 17 00:00:00 2001 From: Dan Milne Date: Sat, 26 Nov 2011 20:31:36 +1100 Subject: [PATCH] Better README --- README.md | 27 +++++++++++++++++++++++---- 1 file changed, 23 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index bef7da0..c3c91f3 100644 --- a/README.md +++ b/README.md @@ -7,15 +7,34 @@ are implemented for your education or for testing purposes and should not be use Installation ------------- -You install it just like any other Ruby gem: - - gem install hsmr +One day I'll learn how to make gems. Until then, git clone is the only way to use this softawre. Usage --------- - require 'hsmr' + require './lib/hsmr' + require './lib/key' + require './lib/component' + # Create a Key + > key=HSMR::Key.new("4CA2161637D0133E5E151AEA45DA2A12") + => 4CA2 1616 37D0 133E 5E15 1AEA 45DA 2A12 + > key.key + => "L\xA2\x16\x167\xD0\x13>^\x15\x1A\xEAE\xDA*\x12" + > key.to_s + => "4CA2 1616 37D0 133E 5E15 1AEA 45DA 2A12" + > key.kcv + => "7B0898" + > key.parity + => "odd" + + # Generate a PVV + + pan="5999997890123412" + pin="1234" + pvki="1" + pvv = HSMR.pvv(key, pan, pvki, pin) + => "0798" Author ==========