Skip to content

Instantly share code, notes, and snippets.

textline1
textline2
textline3
text4
lastlinetext5
@jslmnop
jslmnop / Idea.rb
Created February 17, 2012 14:03
simple pos encryption
class Idea
require 'crypt/cbc'
include Crypt::CBC
require 'digest/md5'
ULONG = 0x100000000
USHORT = 0x10000
encrypt = 0
decrypt = 1
def block_size
return(8)
@jslmnop
jslmnop / idea.rb
Created February 15, 2012 22:44
BACKUP idea.rb for mod
# idea.rb Richard Kernahan <kernighan_rich@rubyforge.org>
# IDEA (International Data Encryption Algorithm) by
# Xuejia Lai and James Massey (1992). Refer to license info at end.
# Ported by Richard Kernahan 2005
module Crypt
class IDEA
require 'crypt/cbc'