cleaner digest algorithm