All Downloads are FREE. Search and download functionalities are using the official Maven repository.

webcrank.clientsession.internal.Iv.scala Maven / Gradle / Ivy

The newest version!
package webcrank.clientsession
package internal

import java.security.SecureRandom
import javax.crypto.spec.IvParameterSpec

object Iv {
  def spec(bytes: Array[Byte]) =
    new IvParameterSpec(bytes)

  def generate(rng: SecureRandom, bytes: Int) = {
    val iv = new Array[Byte](bytes)
    rng.nextBytes(iv)
    iv
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy