AspNetWrapper throws NullArgumentExeption if optionalEntropy is null
hugotonelli opened this issue · 1 comments
hugotonelli commented
CreatePurpose method in AspNetWrapper makes a call to Convert.ToBase64String passing optionalEntropy, which throws NullArgumentException if byte[] inArray is null. It does seem to work, however, with an empty byte array.
Methods in DpapiWrapper are not affected by this, as optionalEntropy can be null when using System.Security.Cryptography.ProtectData Protect or Unprotect methods.
Reference: Convert.ToBase64String in Microsoft Docs
P.S.: Thanks for the wrapper!
pablocar80 commented
Thank you for submitting this issue, will take a look into it this coming week.