Gets the information about cryptographic algorithm used to encrypt a message.
Object of Algorithm class representing information about the signature algorithm.
This sample loads a certificate from the specified file and displays information about it.
[C#] // To use the code below, import MailBee namespace at the top of your code using MailBee.Security; // The actual code (put it into a method of your class) Certificate cert = new Certificate(@"C:\Temp\certificate.cer", CertFileType.Cer, null); Console.WriteLine("Key algorithm name: " + cert.SignatureAlgorithm.Name); Console.WriteLine("Key algorithm OID: " + cert.SignatureAlgorithm.Oid); Console.WriteLine("Key algorithm ID: " + cert.SignatureAlgorithm.ID); Console.WriteLine("Key algorithm bit length: " + cert.SignatureAlgorithm.BitLength);
[Visual Basic] ' To use the code below, import MailBee namespace at the top of your code Imports MailBee.Security ' The actual code (put it into a method of your class) Dim cert As Certificate = New Certificate("C:\Temp\certificate.cer", CertFileType.Cer, Nothing) Console.WriteLine("Key algorithm name: " & cert.SignatureAlgorithm.Name) Console.WriteLine("Key algorithm OID: " & cert.SignatureAlgorithm.Oid) Console.WriteLine("Key algorithm ID: " & cert.SignatureAlgorithm.ID.ToString()) Console.WriteLine("Key algorithm bit length: " & cert.SignatureAlgorithm.BitLength.ToString())
Certificate Class | MailBee.Security Namespace | Algorithm | KeyAlgorithmString