finally getting somewhere with Scala: encrypt/decrypt work with no bounds checking