mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 15:52:43 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			24 lines
		
	
	
	
		
			465 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			24 lines
		
	
	
	
		
			465 B
		
	
	
	
		
			C++
		
	
	
	
	
	
| /*
 | |
|  * Copyright (c) 2020, Ali Mohammad Pur <mpfard@serenityos.org>
 | |
|  *
 | |
|  * SPDX-License-Identifier: BSD-2-Clause
 | |
|  */
 | |
| 
 | |
| #pragma once
 | |
| 
 | |
| #include <AK/Span.h>
 | |
| #include <LibCrypto/ASN1/ASN1.h>
 | |
| #include <LibCrypto/ASN1/DER.h>
 | |
| 
 | |
| namespace Crypto {
 | |
| 
 | |
| enum PEMType {
 | |
|     Certificate,
 | |
|     PrivateKey,
 | |
| };
 | |
| 
 | |
| ByteBuffer decode_pem(ReadonlyBytes);
 | |
| ErrorOr<Vector<ByteBuffer>> decode_pems(ReadonlyBytes);
 | |
| ErrorOr<ByteBuffer> encode_pem(ReadonlyBytes, PEMType = PEMType::Certificate);
 | |
| 
 | |
| }
 | 
