Change Base64 encode flag in signContent to NO_WRAP

This commit is contained in:
Mikołaj Pich 2019-11-01 22:03:27 +01:00
parent 6d7aebf0e9
commit 280e101cfe
No known key found for this signature in database
GPG key ID: F62B26E36D4C4BAA

View file

@ -27,7 +27,7 @@ fun signContent(privateKey: String, content: String): String {
initSign(key)
update(content.toByteArray())
}
return Base64.encodeToString(signature.sign(), Base64.DEFAULT)
return Base64.encodeToString(signature.sign(), Base64.NO_WRAP)
}
fun getPrivateKeyFromCert(password: String, certificate: String): String {
@ -40,4 +40,4 @@ fun getPrivateKeyFromCert(password: String, certificate: String): String {
PKCS8EncodedKeySpec::class.java
)
return Base64.encodeToString(keySpec.encoded, Base64.NO_WRAP)
}
}