// Copyright 2012 The Go Authors. All rights reserved.// Use of this source code is governed by a BSD-style// license that can be found in the LICENSE file.packagecurve25519import("fmt""testing")constexpectedHex="89161fde887b2b53de549af483940106ecc114d6982daa98256de23bdf77661a"funcTestBaseScalarMult(t*testing.T){vara,b[32]bytein:=&aout:=&ba[0]=1fori:=0;i<200;i++{ScalarBaseMult(out,in)in,out=out,in}result:=fmt.Sprintf("%x",in[:])ifresult!=expectedHex{t.Errorf("incorrect result: got %s, want %s",result,expectedHex)}}funcBenchmarkScalarBaseMult(b*testing.B){varin,out[32]bytein[0]=1b.SetBytes(32)fori:=0;i<b.N;i++{ScalarBaseMult(&out,&in)}}