Página 1 de 1

Cifrado Vigenere

Publicado: 26 Feb 2014, 18:02
por sanko

Código: Seleccionar todo

module Vigenere where
	import Data.Char
	
	xEnc :: String -> Int -> String
	xEnc xs ys = [chr ((fst(x) + snd(x)) `mod` 256)| x <- zip [ord x | x <- xs] [ord y | y <- ys]]
	
	xDec :: String -> Int -> String
	xDec xs ys = [chr ((fst(x) - snd(x)) `mod` 256)| x <- zip [ord x | x <- xs] [ord y | y <- ys]]
No hay mucho más que decir, ultimamente me aburro mucho

Re: Cifrado Vigenere

Publicado: 26 Feb 2014, 18:06
por strup
joder amo las listas intensionales, haskell me enamoro loco un lujo este codigo y muy guapo voy haber si me hago algo en haskell saludos crack