Skip to content

The helper for creating X509 certificates from a body and a private key in PEM format for .NET Core 3.1. Also there are available methods: Sign, Verify data based on PEM.

License

Notifications You must be signed in to change notification settings

spoleto-software/Spoleto.Cryptography.RSA

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Spoleto.Cryptography.RSA

The helper for creating X509 certificates from a body and a private key in PEM format for .NET Core 3.1.
Methods are also available: Sign, Verify data based on PEM.

Examples:

// Create certificate from the body and the private key in PEM format:
var certificate = RSACryptoPemHelper.CreateCertificate(certificatePemText, privateKeyPemText);

var data = "The string to sign";

// Sign data by the private key:
var signedData = RSACryptoPemHelper.Sign(privateKeyPemText, data);

// Verify signed data by the public key in the certificate:
var isVerified = RSACryptoPemHelper.Verify(certificatePemText, data, signedData);

Unit tests

You can find the unit tests here:
https://github.com/spoleto-software/Spoleto.Cryptography.RSA/tree/main/src/Spoleto.Cryptography.Rsa.Tests

About

The helper for creating X509 certificates from a body and a private key in PEM format for .NET Core 3.1. Also there are available methods: Sign, Verify data based on PEM.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages