Files
2024-03-07 12:48:47 +01:00

5 lines
199 B
TypeScript

export default (b64: string, descriptor: string) => {
const newlined = (b64.match(/.{1,64}/g) || []).join('\n')
return `-----BEGIN ${descriptor}-----\n${newlined}\n-----END ${descriptor}-----`
}