调整 RSA 加密的写法以兼容 Android

This commit is contained in:
czp 2018-03-05 10:44:32 +08:00
parent 7d4853e2c5
commit 66abefd0a9
2 changed files with 2 additions and 2 deletions

View File

@ -1,5 +1,5 @@
group = 'com.hiczp'
version = '0.0.6'
version = '0.0.7'
description = 'Bilibili android client API library written in Java'
apply plugin: 'idea'

View File

@ -47,7 +47,7 @@ public class BilibiliSecurityHelper {
//加密密码
String cipheredPassword;
try {
Cipher cipher = Cipher.getInstance("RSA");
Cipher cipher = Cipher.getInstance("RSA/ECB/PKCS1Padding");
cipher.init(Cipher.ENCRYPT_MODE, publicKey);
cipheredPassword = new String(
Base64.getEncoder().encode(