mirror of
https://github.com/czp3009/bilibili-api.git
synced 2025-01-20 20:40:42 +08:00
调整 RSA 加密的写法以兼容 Android
This commit is contained in:
parent
7d4853e2c5
commit
66abefd0a9
@ -1,5 +1,5 @@
|
|||||||
group = 'com.hiczp'
|
group = 'com.hiczp'
|
||||||
version = '0.0.6'
|
version = '0.0.7'
|
||||||
description = 'Bilibili android client API library written in Java'
|
description = 'Bilibili android client API library written in Java'
|
||||||
|
|
||||||
apply plugin: 'idea'
|
apply plugin: 'idea'
|
||||||
|
@ -47,7 +47,7 @@ public class BilibiliSecurityHelper {
|
|||||||
//加密密码
|
//加密密码
|
||||||
String cipheredPassword;
|
String cipheredPassword;
|
||||||
try {
|
try {
|
||||||
Cipher cipher = Cipher.getInstance("RSA");
|
Cipher cipher = Cipher.getInstance("RSA/ECB/PKCS1Padding");
|
||||||
cipher.init(Cipher.ENCRYPT_MODE, publicKey);
|
cipher.init(Cipher.ENCRYPT_MODE, publicKey);
|
||||||
cipheredPassword = new String(
|
cipheredPassword = new String(
|
||||||
Base64.getEncoder().encode(
|
Base64.getEncoder().encode(
|
||||||
|
Loading…
Reference in New Issue
Block a user