diff options
author | iximeow <me@iximeow.net> | 2014-11-23 18:56:24 -0800 |
---|---|---|
committer | iximeow <me@iximeow.net> | 2014-11-23 18:56:24 -0800 |
commit | d32466d20399489ae5cf254588c87e009a9c29f7 (patch) | |
tree | 71bbf790220fd3daf574d3867dfd8c816e839fd4 /src/utils/ConversionUtils.scala | |
parent | aa390776b26d794ab37aa13833fa7043aad16504 (diff) |
Add challenge 4
Diffstat (limited to 'src/utils/ConversionUtils.scala')
-rw-r--r-- | src/utils/ConversionUtils.scala | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/utils/ConversionUtils.scala b/src/utils/ConversionUtils.scala index 09f3aab..f8935f2 100644 --- a/src/utils/ConversionUtils.scala +++ b/src/utils/ConversionUtils.scala @@ -1,6 +1,7 @@ package ixee.cryptopals.utils import ByteUtils._ +import FunctionUtils._ object ConversionUtils { def hexStr2Bytes(s: String): Seq[Byte] = @@ -61,9 +62,6 @@ object ConversionUtils { def asBytes = s.toSeq.map(_.toByte) } - // Because doing (_ f _).tupled confuses the inferencer... - def tup[A, B, C](f: (A, B) => C): ((A, B)) => C = f.tupled - // TODO: tailrec this, get rid of for def toByteSeq[T : SizedNumeric : BitOps](x: T): Seq[Byte] = { val buf = new Array[Byte](x.byteSize) |