[syslog-ng] [PATCH] tfhash: New template function to calculate the SHA1 of its input

Balazs Scheidler bazsi77 at gmail.com
Sat Aug 4 07:01:29 CEST 2012


I'd love to see a length parameter to specify the length of the output. a short prefix might be enough for identifying a string and takes much less space.

substr could be applied for sure, but this is much simpler (and faster)

cool idea btw, I'll be pulling this to 3.4 after review.

----- Original message -----
> On 2012-08-03, Peter Gyongyosi wrote:
> 
> > tfhash: New template function to calculate the SHA1 of its input
> > 
> > This patch adds a new template function called $(hash) which can be
> > used to calculate the SHA1 hash of its inputs. As it uses the SHA1()
> > function from OpenSSL, it is only available if syslog-ng is compiled
> > using --enable-ssl.
> > 
> > One use case for it can be when you'd like to anonymize sensitive
> > parts of   the
> > log message (eg. the user name) you parsed out using patterndb before
> > storing or forwarding it for further analysis but would like to retain
> > the ability to correlate messages along this value.
> 
> I like this very much! Another use case would be to use $(hash) along
> with   $(substr) to "shard" logs across multiple storage points.
> 
> I'd love to see $(hash) with an (optional?) argument specifying the
> digest   algorithm to use, but even with just SHA-1 it's really cool (and
> simple).
> 
> 
> 
> -- 
> Jakub Jankowski|shasta at toxcorp.com|http://toxcorp.com/
> GPG: FCBF F03D 9ADB B768 8B92 BB52 0341 9037 A875 942D
> ______________________________________________________________________________
> Member info: https://lists.balabit.hu/mailman/listinfo/syslog-ng
> Documentation:
> http://www.balabit.com/support/documentation/?product=syslog-ng FAQ:
> http://www.balabit.com/wiki/syslog-ng-faq
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.balabit.hu/pipermail/syslog-ng/attachments/20120804/30553747/attachment.htm 


More information about the syslog-ng mailing list