summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/Set1Spec.scala11
1 files changed, 10 insertions, 1 deletions
diff --git a/test/Set1Spec.scala b/test/Set1Spec.scala
index 4dbbfef..a7a8ef6 100644
--- a/test/Set1Spec.scala
+++ b/test/Set1Spec.scala
@@ -5,6 +5,8 @@ import com.ixee.IxeeSpec
class Set1Spec extends IxeeSpec {
import ixee.cryptopals.utils.ConversionUtils._
+ import ixee.cryptopals.utils.ByteUtils._
+ import ixee.cryptopals.solvers._
"Set1" - {
@@ -26,10 +28,17 @@ class Set1Spec extends IxeeSpec {
"686974207468652062756c6c277320657965"
)
- (a xor b).toHexStr mustBe
+ (a xor b).hex mustBe
"746865206b696420646f6e277420706c6179"
}
+ "Challenge 3: single-byte xor cipher" in {
+ XorDecrypt.findBestSingleByteKey(
+ hexStr2Bytes(
+ "1b37373331363f78151b7f2b783431333d78397828372d363c78373e783a393b3736"
+ )
+ ) mustBe 88.toByte
+ }
}
}