RsaKey.cs 563 B

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