secure/precis: use span for the Transform method

Reduce the need to duplicate the logic and also gives
a healthy performance boost to Transform (about
-37% for BenchmarkTransform/OpaqueString/ASCII).

Change-Id: Ibd2ecdab976902e9b9f83de56b1d54cbfb6aa83d
Reviewed-on: https://go-review.googlesource.com/23804
Run-TryBot: Marcel van Lohuizen <mpvl@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Nigel Tao <nigeltao@golang.org>
1 file changed