Format RsaTest

master
Graham 5 years ago
parent e82f575695
commit c8af2288c6
  1. 6
      common/src/test/java/dev/openrs2/common/crypto/RsaTest.kt

@ -18,7 +18,8 @@ object RsaTest {
// example data from https://en.wikipedia.org/wiki/RSA_(cryptosystem)#Example
private val PUBLIC_KEY = allowUnsafeMod { RSAKeyParameters(false, BigInteger("3233"), BigInteger("17")) }
private val PRIVATE_KEY = allowUnsafeMod { RSAKeyParameters(true, BigInteger("3233"), BigInteger("413")) }
private val PRIVATE_KEY_CRT = allowUnsafeMod { RSAPrivateCrtKeyParameters(
private val PRIVATE_KEY_CRT = allowUnsafeMod {
RSAPrivateCrtKeyParameters(
BigInteger("3233"), // modulus
BigInteger("17"), // public exponent
BigInteger("413"), // private exponent
@ -27,7 +28,8 @@ object RsaTest {
BigInteger("53"), // dP
BigInteger("49"), // dQ
BigInteger("38") // qInv
) }
)
}
private val PUBLIC_KEY_PEM = listOf(
"-----BEGIN PUBLIC KEY-----",

Loading…
Cancel
Save