Skip to content

Instantly share code, notes, and snippets.

@Ksisu
Ksisu / KeyGenerator.scala
Created October 20, 2019 18:03
ECDSA + RSA keygen
object KeyGenerator {
import java.security.{KeyPair, KeyPairGenerator}
import java.util.Base64
def generateECDSAKeyPair: (String, String) = {
import java.security.spec.ECGenParameterSpec
import java.security.{SecureRandom, Security}
import org.bouncycastle.jce.provider.BouncyCastleProvider