Commit 1728e805 authored by Him188's avatar Him188

Add ByteArray.decryptBy

parent 68969669
...@@ -84,6 +84,11 @@ fun <R> dataDecode(byteArray: ByteArray, t: (DataInputStream) -> R): R = byteArr ...@@ -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())
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment