Thanks for reaching out!
SecureString is not deprecated in .NET Framework 4.8 and can still be used to store the PIN temporarily in memory for a WPF app. However, Microsoft no longer recommends it for new development or for future frameworks.
The protection provided by SecureString is limited.
For stronger security or cross-platform scenarios, use Windows DPAPI or Credential Manger instead.
How to: Use Data Protection - .NET | Microsoft Learn
Let me know if you need any further help with this. We'll be happy to assist.
If you find this helpful, Kindly mark the provided solution as "Accept Answer", so that others in the community facing similar issues can easily find the solution. Your contribution is highly appreciated.