Cryptography Improvements in .NET 5 - Support for PEM

8 gru 2020 | Blog | cryptography | pem | .net | programowanie | IT

.NET always had a broad range of cryptographic services. That said, there was always one area that was lacking - importing keys. Some of the existing methods are hard to use and require deep knowledge of how keys are constructed. This is why people who just wanted to get things working resorted to a number of different solutions starting from hybrids between .NET and Bouncy Castle and finishing with pure Bouncy Castle implementations.

What's New in .NET 5?

To be precise, the progress started with .NET Core 3.0 which brought support for PKCS #8 and X.509 SubjectPublicKeyInfo. This was a step forward, but it didn't solve one of the key problems - reading keys from their textually encoded form. This has been addressed in .NET 5.0 by bringing direct support for PEM. This, together with other APIs like ASN.1 reader/writer, opened ways for easier usage of keys stored in different forms.

An Example

The primary use case for PEM support is reading keys directly from .pem files content, but I wanted to show something else. The

POSTY TEGO AUTORA

Monitoring C# Azure Functions in the Isolated Worker Model - Infrastructure & Configuration Deep Dive26 lis 2024

Blog | programowanie | .net | c# | azure functions | IT

ASP.NET Core 9 and IAsyncEnumerable - Async Streaming JSON and NDJSON From Blazor WebAssembly24 wrz 2024

Blog | programowanie | .net | c# | asp.net core | blazor | IT

Azure Functions Extensibility - Extensions and Isolated Worker Model5 mar 2024

Blog | programowanie | .net | c# | azure functions | azure | IT

Azure Functions Extensibility - Runtime Scaling22 lut 2024

Blog | programowanie | .net | c# | azure | IT

Yet Another Developer Blog

noreply@blogger.com (Tomasz Pęczek)