When trying to compile the project by setting scalaVersion := 2.10.1 I get this compiler error:
[error] (snipped path)/scala-totp-auth/src/main/scala/TOTPSecret.scala:82: overloaded method constructor TOTPSecret with alternatives:
[error] (b32Digits: Int)org.catch22.totp.auth.TOTPSecret <and>
[error] (bytes: Array[Byte])org.catch22.totp.auth.TOTPSecret <and>
[error] (bigInteger: java.math.BigInteger)org.catch22.totp.auth.TOTPSecret
[error] cannot be applied to (scala.math.BigInt)
[error] new TOTPSecret(BigInt(hex,16))
[error] ^
I also get this deprecation warning:
[warn] (snipped path)/scala-totp-auth/src/main/scala/TOTPSecret.scala:28: inheritance from class BigInt in package math is deprecated: This class will me made final.
I saw in the comments in TOTPSecret.scala the reason for subclassing BigInt. A different design might use an implicit def to tack on a toBase32 method to BigInt and instead turn TOTPSecret into a generator of BigInts that are tokens.
When trying to compile the project by setting scalaVersion := 2.10.1 I get this compiler error:
I also get this deprecation warning:
The warning is from the change in 2.10 to make BigInt final (see https://issues.scala-lang.org/browse/SI-6162 and http://www.scala-lang.org/api/current/index.html#scala.math.BigInt).
I saw in the comments in
TOTPSecret.scala
the reason for subclassingBigInt
. A different design might use animplicit def
to tack on atoBase32
method toBigInt
and instead turnTOTPSecret
into a generator ofBigInt
s that are tokens.