Skip to content

Instantly share code, notes, and snippets.

View wouzar's full-sized avatar
😱
Focusing

Viktor Moskvych wouzar

😱
Focusing
View GitHub Profile
@wouzar
wouzar / CryptoHelper.scala
Last active November 24, 2016 14:40
Code for basic Cezar's algo implementation for encoding text
object CryptoHelper {
def shift(alphabet: Seq[Char], seq: String, bias: Int, count: Option[Int] = None): String = {
val seqToIter = count match {
case Some(c) => seq.take(c)
case None => seq
}
seqToIter.toLowerCase.map { ch =>
val res =