Esempio n. 1
0
	def testDecidBad(self):
		# try decoding a non integer ciphertext
		c = Crypto('some secret key_')
		plaintext = 'foo'
		ciphertext = c.enc(plaintext)
		with throwing(CryptoException):
			plaintext2 = c.decid(ciphertext)
Esempio n. 2
0
	def testEncidBad(self):
		# try encoding a non integer
		c = Crypto('some secret key_')
		plaintext = 'foo'
		with throwing(CryptoException):
			ciphertext = c.encid(plaintext)