fix: PEMを修正

This commit is contained in:
usbharu 2023-04-29 16:27:42 +09:00
parent d130f5c133
commit 099428ef00
1 changed files with 3 additions and 3 deletions

View File

@ -44,11 +44,11 @@ class UserAuthService(
fun PublicKey.toPem(): String {
return "-----BEGIN PUBLIC KEY-----\n" +
Base64.getEncoder().encodeToString(encoded).chunked(64).joinToString("\n") +
"\n-----END PUBLIC KEY-----\n"
"\n-----END PUBLIC KEY-----"
}
fun PrivateKey.toPem(): String {
return "-----BEGIN PRIVATE KEY-----" +
return "-----BEGIN PRIVATE KEY-----\n" +
Base64.getEncoder().encodeToString(encoded).chunked(64).joinToString("\n") +
"\n-----END PRIVATE KEY-----\n"
"\n-----END PRIVATE KEY-----"
}