Open-source multiplayer game server compatible with the RuneScape client
https://www.openrs2.org/
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
605 B
18 lines
605 B
4 years ago
|
package org.openrs2.archive.key
|
||
4 years ago
|
|
||
4 years ago
|
import org.openrs2.crypto.XteaKey
|
||
4 years ago
|
import java.io.InputStream
|
||
|
|
||
|
public object TextKeyReader : KeyReader {
|
||
|
override fun read(input: InputStream): Sequence<XteaKey> {
|
||
|
val reader = input.bufferedReader()
|
||
|
|
||
|
val k0 = reader.readLine().toIntOrNull() ?: return emptySequence()
|
||
|
val k1 = reader.readLine().toIntOrNull() ?: return emptySequence()
|
||
|
val k2 = reader.readLine().toIntOrNull() ?: return emptySequence()
|
||
|
val k3 = reader.readLine().toIntOrNull() ?: return emptySequence()
|
||
|
|
||
|
return sequenceOf(XteaKey(k0, k1, k2, k3))
|
||
|
}
|
||
|
}
|