# HG changeset patch
# User Yann Laigle-Chapuy <yannlaiglechapuy@gmail.com>
# Date 1246450354 -7200
# Node ID 1846253c45455c339b627491cb4d1107ca12d0bd
# Parent  7c5c8a61a57b7720828b7dbfa87fff3b9d6444b1
add an indirect doctest

diff -r 7c5c8a61a57b -r 1846253c4545 sage/crypto/mq/sbox.py
--- a/sage/crypto/mq/sbox.py	Wed Jul 01 11:29:57 2009 +0200
+++ b/sage/crypto/mq/sbox.py	Wed Jul 01 14:12:34 2009 +0200
@@ -492,6 +492,20 @@
         ncols = 1<<n
 
         def _walsh_transform(f):
+            """
+            Compute the Walsh transform of `f` in place.
+
+            EXAMPLE::
+
+                sage: S = mq.SBox(3,2,7,1)
+                sage: S.linear_approximation_matrix() # indirect doctest
+                [ 2 -1 -1  0  1  0  0 -1]
+                [ 0 -1 -1  2 -1  0  0  1]
+                [ 0  1 -1  0  1  0 -2  1]
+                [ 0 -1  1  0  1 -2  0  1]
+
+            NOTE: internal use only; we use the specific dimension of the S-Box.
+            """
             for ldk in xrange(1,m+1):
                 k  = 1<<ldk
                 kh = k//2
