예제 #1
0
	def testLongMessage(self):
		obj = [range(0,1000)]*1000
		txt = toTxt(self.key,self.iv,self.seq,obj)
		test = fromTxt(self.key,self.iv,self.seq,txt)
		map(self.assertEquals,test,[range(1000)]*1000)
예제 #2
0
	def testInvalidToken(self):
		obj = ["foo","bar"]
		msg = toTxt(self.key,self.iv,self.seq,obj)
		self.assertRaises(MsgSequenceError,fromTxt,self.key,self.iv,1,self.result_txt)
예제 #3
0
	def testSimpleEncryptMessage(self):
		obj = ["foo","bar"]
		self.assert_(TestBotMessage.result_txt == toTxt(self.key,self.iv,self.seq,obj))