public static void WriteFileBytes()

in CredentialProvider.Microsoft/Util/EncryptedFileWithPermissions.cs [49:67]


        public static void WriteFileBytes(string filePath, byte[] bytes, bool writeUnencrypted = false)
        {
            try
            {
                EnsureDirectoryExists(filePath);
                
                WriteToNewFileWithOwnerRWPermissions(filePath, ProtectedData.Protect(bytes, null, DataProtectionScope.CurrentUser));
            }
            catch (NotSupportedException)
            {
                if (writeUnencrypted)
                {
                    WriteToNewFileWithOwnerRWPermissions(filePath, bytes);
                    return;
                }

                throw;
            }
        }