对 String 形态的 RSA public key 进行预处理时, 对 \n 使用 replaceAll 而不是原来的 replace

This commit is contained in:
czp
2017-11-10 13:23:30 +08:00
parent 6dc03953e9
commit fc9ee6e3e3

View File

@@ -98,7 +98,7 @@ public class BilibiliRESTAPI {
keyEntity.getData().getKey()
.replace("-----BEGIN PUBLIC KEY-----", "")
.replace("-----END PUBLIC KEY-----", "")
.replace("\n", "")
.replaceAll("\n", "")
.getBytes()
)
);