Index: /branches/release-35/php/lib/modifier.encode_sha1.php
===================================================================
--- /branches/release-35/php/lib/modifier.encode_sha1.php (revision 1953)
+++ /branches/release-35/php/lib/modifier.encode_sha1.php (revision 1953)
@@ -0,0 +1,11 @@
+<?php
+# Movable Type (r) Open Source (C) 2001-2008 Six Apart, Ltd.
+# This program is distributed under the terms of the
+# GNU General Public License, version 2.
+#
+# $Id$
+
+function smarty_modifier_encode_sha1($text) {
+    return sha1($text);
+}
+?>
Index: /branches/release-35/lib/MT/Template/ContextHandlers.pm
===================================================================
--- /branches/release-35/lib/MT/Template/ContextHandlers.pm (revision 1949)
+++ /branches/release-35/lib/MT/Template/ContextHandlers.pm (revision 1953)
@@ -577,4 +577,5 @@
             'dirify' => \&_fltr_dirify,
             'sanitize' => \&_fltr_sanitize,
+            'encode_sha1' => \&_fltr_sha1,
             'encode_html' => \&_fltr_encode_html,
             'encode_xml' => \&_fltr_encode_xml,
@@ -608,4 +609,10 @@
         },
     };
+}
+
+sub _fltr_sha1 {
+    my ($str) = @_;
+    require MT::Util;
+    return MT::Util::perl_sha1_digest_hex($str);
 }
 
