/// <summary> /// Generate Pkcs1 format RSA public key. /// </summary> /// <param name="key"></param> /// <returns></returns> public static RsaKey GeneratePublicKeyInPkcs1(string key) => RsaKeyGenerator.GeneratePublicKeyInPkcs1(key);
public static IRSA CreateWithPublicKeyInPkcs1(string key) => new RsaFunction(RsaKeyGenerator.GeneratePublicKeyInPkcs1(key));
/// <summary> /// Generate Pkcs1 format RSA public key. /// </summary> /// <param name="keySize">Key Size.Unit: bits</param> /// <param name="keepingFormat">Whether the format is true If it is standard pem file format</param> /// <returns></returns> public static RsaKey GeneratePublicKeyInPkcs1(RsaKeySize keySize, bool keepingFormat) => RsaKeyGenerator.GeneratePublicKeyInPkcs1(keySize, keepingFormat);