Mega Code Archive

 
Categories / Ruby / String
 

Crypt a string

coded = "hfCghHIE5LAM." password = 'bf' puts password.crypt("hf") if password.crypt("hf") == coded   puts "Welcome!" else   puts "What are you, an orc?" end