mirror of
https://github.com/2revoemag/PSF-BotServer.git
synced 2026-02-28 10:43:37 +00:00
basic client
it's able to join the world and perform basic state updates. packet parsing is very primitive.
This commit is contained in:
parent
bfedba07d7
commit
0d4a5ad40e
5 changed files with 454 additions and 72 deletions
|
|
@ -9,9 +9,9 @@ import java.security.SecureRandom
|
|||
case class DiffieHellman(p: Array[Byte], g: Array[Byte]) {
|
||||
import DiffieHellman._
|
||||
|
||||
private val _p = BigInt(1, p)
|
||||
private val _g = BigInt(1, g)
|
||||
private val privateKey: BigInt = BigInt(128, random)
|
||||
private val _p = BigInt(1, p)
|
||||
private val _g = BigInt(1, g)
|
||||
private val privateKey = BigInt(128, random)
|
||||
|
||||
val publicKey: Array[Byte] = bytes(_g.modPow(privateKey, _p))
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue