[skip ci]
This commit is contained in:
@@ -1,16 +1,16 @@
|
|||||||
https://github.com/gedoor/legado/pull/2880
|
https://github.com/gedoor/legado/pull/2880
|
||||||
|
|
||||||
非对称加密一般只能知道其中一个密钥,而RhinoJs调用java方法不能传入null, 因此提供以下重载函数
|
非对称加密一般只能知道其中一个密钥,而RhinoJs调用java方法不能传入null和KeyType, 因此提供以下重载函数
|
||||||
```kotlin
|
```kotlin
|
||||||
fun setPublicKey(key: ByteArray): T
|
fun setPublicKey(key: ByteArray): T
|
||||||
fun setPublicKey(key: String): T
|
fun setPublicKey(key: String): T
|
||||||
fun setPrivateKey(key: ByteArray): T
|
fun setPrivateKey(key: ByteArray): T
|
||||||
fun setPrivateKey(key: String): T
|
fun setPrivateKey(key: String): T
|
||||||
|
|
||||||
fun decrypt(data: Any): ByteArray?
|
fun decrypt(data: Any, keyType: Int): ByteArray?
|
||||||
fun decryptStr(data: Any): String?
|
fun decryptStr(data: Any, keyType: Int): String?
|
||||||
|
|
||||||
fun encrypt(data: Any): ByteArray?
|
fun encrypt(data: Any, keyType: Int): ByteArray?
|
||||||
fun encryptHex(data: Any): String?
|
fun encryptHex(data: Any, keyType: Int): String?
|
||||||
fun encryptBase64(data: Any): String?
|
fun encryptBase64(data: Any, keyType: Int): String?
|
||||||
```
|
```
|
||||||
Reference in New Issue
Block a user