mirror of
https://github.com/mamoe/mirai.git
synced 2025-01-09 18:00:33 +08:00
Add ByteArray.decryptBy
This commit is contained in:
parent
6896966963
commit
1728e80532
@ -84,6 +84,11 @@ fun <R> dataDecode(byteArray: ByteArray, t: (DataInputStream) -> R): R = byteArr
|
|||||||
|
|
||||||
fun <R> ByteArray.decode(t: (DataInputStream) -> R): R = this.dataInputStream().let(t)
|
fun <R> ByteArray.decode(t: (DataInputStream) -> R): R = this.dataInputStream().let(t)
|
||||||
|
|
||||||
|
fun ByteArray.decryptBy(key: ByteArray): ByteArray = TEA.decrypt(this, key)
|
||||||
|
|
||||||
|
fun ByteArray.decryptBy(key: String): ByteArray = TEA.decrypt(this, key)
|
||||||
|
|
||||||
|
|
||||||
fun DataInputStream.skip(n: Number) {
|
fun DataInputStream.skip(n: Number) {
|
||||||
this.skip(n.toLong())
|
this.skip(n.toLong())
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user