RsaKey.cs 485 B

1234567891011121314151617181920212223
  1. namespace Masuit.Tools.Security;
  2. /// <summary>
  3. /// RSA密钥对
  4. /// </summary>
  5. public class RsaKey
  6. {
  7. /// <summary>
  8. /// 公钥
  9. /// </summary>
  10. public string PublicKey { get; protected internal set; }
  11. /// <summary>
  12. /// 私钥
  13. /// </summary>
  14. public string PrivateKey { get; protected internal set; }
  15. public void Deconstruct(out string publicKey, out string privateKey)
  16. {
  17. publicKey = PublicKey;
  18. privateKey = PrivateKey;
  19. }
  20. }