Skip to content

Commit

Permalink
Fix Scala 3 compile
Browse files Browse the repository at this point in the history
  • Loading branch information
armanbilge committed Apr 1, 2022
1 parent 0924b9c commit 826ae87
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,13 @@ private[crypto] trait HmacKeyGenCompanionPlatform {
Some(F)
.collect { case f: Async[F] => f }
.fold {
F.delay {
F.delay[SecretKey[A]] {
val key =
crypto.generateKeySync("hmac", GenerateKeyOptions(algorithm.minimumKeyLength))
SecretKeySpec(ByteVector.view(key.`export`()), algorithm)
}
} { F =>
F.async_ { cb =>
F.async_[SecretKey[A]] { cb =>
crypto.generateKey(
"hmac",
GenerateKeyOptions(algorithm.minimumKeyLength),
Expand All @@ -55,7 +55,6 @@ private[crypto] trait HmacKeyGenCompanionPlatform {
)
}
}
.widen

}
else
Expand Down

0 comments on commit 826ae87

Please sign in to comment.