<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="generator" content="Osso Notes">
<title></title></head>
<body>
<p>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.
<br>
<br>substr could be applied for sure, but this is much simpler (and faster)
<br>
<br>cool idea btw, I'll be pulling this to 3.4 after review.
<br>
<br>----- Original message -----
<br>> On 2012-08-03, Peter Gyongyosi wrote:
<br>>
<br>> > tfhash: New template function to calculate the SHA1 of its input
<br>> >
<br>> > This patch adds a new template function called $(hash) which can be
<br>> > used to calculate the SHA1 hash of its inputs. As it uses the SHA1()
<br>> > function from OpenSSL, it is only available if syslog-ng is compiled
<br>> > using --enable-ssl.
<br>> >
<br>> > One use case for it can be when you'd like to anonymize sensitive
<br>> > parts of  the
<br>> > log message (eg. the user name) you parsed out using patterndb before
<br>> > storing or forwarding it for further analysis but would like to retain
<br>> > the ability to correlate messages along this value.
<br>>
<br>> I like this very much! Another use case would be to use $(hash) along
<br>> with  $(substr) to "shard" logs across multiple storage points.
<br>>
<br>> I'd love to see $(hash) with an (optional?) argument specifying the
<br>> digest  algorithm to use, but even with just SHA-1 it's really cool (and
<br>> simple).
<br>>
<br>>
<br>>
<br>> --
<br>> Jakub Jankowski|<a href="mailto:shasta@toxcorp.com">shasta@toxcorp.com</a>|<a href="http://toxcorp.com/">http://toxcorp.com/</a>
<br>> GPG: FCBF F03D 9ADB B768 8B92 BB52 0341 9037 A875 942D
<br>> ______________________________________________________________________________
<br>> Member info: <a href="https://lists.balabit.hu/mailman/listinfo/syslog-ng">https://lists.balabit.hu/mailman/listinfo/syslog-ng</a>
<br>> Documentation:
<br>> <a href="http://www.balabit.com/support/documentation/?product=syslog-ng">http://www.balabit.com/support/documentation/?product=syslog-ng</a> FAQ:
<br>> <a href="http://www.balabit.com/wiki/syslog-ng-faq">http://www.balabit.com/wiki/syslog-ng-faq</a>
<br>>
<br><br></p>
</body>
</html>