Created
February 18, 2024 01:45
-
-
Save Code-Hex/863b958bc89b9f339efb477103ab4453 to your computer and use it in GitHub Desktop.
pemToBinary
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export function pemToBinary(pem: string): Uint8Array { | |
return decodeBase64(pem.replace(/-+(BEGIN|END).*/g, '').replace(/\s/g, '')) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment