mirror of
https://github.com/mamoe/mirai.git
synced 2025-02-08 16:54:47 +08:00
Fixed bug
This commit is contained in:
parent
965958bc24
commit
7bf8d3fb19
@ -113,7 +113,7 @@ fun DataOutputStream.encryptAndWrite(byteArray: ByteArray, key: ByteArray) {
|
||||
}
|
||||
|
||||
fun DataOutputStream.encryptAndWrite(key: ByteArray, encoder: ByteArrayDataOutputStream.() -> Unit) {
|
||||
this.write(TEA.encrypt(ByteArrayDataOutputStream().also(encoder).toByteArray(), key))
|
||||
this.write(TEA.encrypt(ByteArrayDataOutputStream().apply(encoder).use { it.toByteArray() }, key))
|
||||
}
|
||||
|
||||
fun DataOutputStream.encryptAndWrite(keyHex: String, encoder: ByteArrayDataOutputStream.() -> Unit) {
|
||||
|
Loading…
Reference in New Issue
Block a user