Base64 string of PEM body
PEM header string (ex. 'RSA PRIVATE KEY')
new line string
PEM formatted string of input data
This function converts a Base64 string to a PEM string with a specified header. Its line break will be CRLF("\r\n").
b64topem('YWFh', 'RSA PRIVATE KEY') ->
-----BEGIN PRIVATE KEY-----
YWFh
-----END PRIVATE KEY-----
get PEM string from Base64 string