mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-08 10:36:02 +00:00
LibCrypto: Add PEM encoder
This commit adds a new method to create a PEM encoded ASN1 from its DER variant.
This commit is contained in:
parent
7ce75ee3c5
commit
8b881eaf02
Notes:
sideshowbarker
2024-07-16 23:57:20 +09:00
Author: https://github.com/fdellwing
Commit: 8b881eaf02
Pull-request: https://github.com/SerenityOS/serenity/pull/18152
Reviewed-by: https://github.com/ADKaster ✅
Reviewed-by: https://github.com/caoimhebyrne
Reviewed-by: https://github.com/trflynn89
2 changed files with 42 additions and 0 deletions
|
@ -12,7 +12,13 @@
|
|||
|
||||
namespace Crypto {
|
||||
|
||||
enum PEMType {
|
||||
Certificate,
|
||||
PrivateKey,
|
||||
};
|
||||
|
||||
ByteBuffer decode_pem(ReadonlyBytes);
|
||||
ErrorOr<Vector<ByteBuffer>> decode_pems(ReadonlyBytes);
|
||||
ErrorOr<ByteBuffer> encode_pem(ReadonlyBytes, PEMType = PEMType::Certificate);
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue