#!/usr/local/bin/ruby
# $Revision: 1.2 $
# $Date: 2003/12/04 22:18:34 $
# $Author: mikeman2 $

#256 bit encryption
#newmain/crypt.dat must be a 64bit hex string

require 'aes' #http://aescrypt.sf.net

C = AES.new
C.set_key(File.open("crypt.dat", "r").gets.chomp)

class String
	def encrypt
		if self.length > 15
			return nil
		end
		str = self
		while str.length < 16
			str = str + " "
		end
		return C.encrypt(str)
	end
end