go/src
Kevin Burke 448d3952af crypto/sha256: add examples for New, Sum256
The goal for these examples is to show how to mirror the
functionality of the sha256sum Unix utility, a common checksumming
tool, using the Go standard library.

Add a newline at the end of the input, so users will get the same
output if they type `echo 'hello world' | sha256sum`, since the
builtin shell echo appends a newline by default. Also use hex output
(instead of the shorter base64) since this is the default output
encoding for shasum/sha256sum.

Change-Id: I0036874b3cc5ba85432bfcb86f81b51c4e0238fd
Reviewed-on: https://go-review.googlesource.com/24868
Reviewed-by: Emmanuel Odeke <emm.odeke@gmail.com>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2016-08-31 05:13:48 +00:00
..
archive archive/tar: isolate regular and sparse file handling as methods 2016-08-25 18:33:09 +00:00
bufio
builtin
bytes bytes: add examples 2016-08-16 01:33:32 +00:00
cmd cmd/compile/internal/gc: clean up closure.go 2016-08-31 01:31:36 +00:00
compress compress/flate: always return uncompressed data in the event of error 2016-08-31 01:12:02 +00:00
container container/list: silence vet warnings 2016-08-16 14:35:37 +00:00
context all: use time.Until where applicable 2016-08-30 01:23:46 +00:00
crypto crypto/sha256: add examples for New, Sum256 2016-08-31 05:13:48 +00:00
database/sql database/sql: don't hang if the driver Exec method panics 2016-08-29 16:51:56 +00:00
debug all: use testing.GoToolPath instead of "go" 2016-08-30 22:49:11 +00:00
encoding encoding/xml: do not ignore error return from copyValue 2016-08-22 18:01:47 +00:00
errors
expvar expvar: slightly expand documentation for Var's String method 2016-05-19 04:20:47 +00:00
flag flag: improve comment for calling String with zero value 2016-08-23 22:07:43 +00:00
fmt fmt: properly handle early io.EOF Reads in readRune.readByte 2016-07-16 19:14:58 +00:00
go all: use testing.GoToolPath instead of "go" 2016-08-30 22:49:11 +00:00
hash hash/crc32: fix nil Castagnoli table problem 2016-08-28 19:01:07 +00:00
html html/template: update security model link 2016-06-23 04:30:07 +00:00
image
index/suffixarray index/suffixarray: add Lookup example 2016-08-21 01:10:22 +00:00
internal internal/testenv: make MustHaveSymlink message friendly 2016-08-24 05:08:52 +00:00
io io: fix comment in test 2016-08-22 22:27:59 +00:00
log log/syslog: document that Dial uses net.Dial parameters, add example 2016-08-19 01:01:47 +00:00
math math/big: add assembly implementation of arith for ppc64{le} 2016-08-29 21:03:21 +00:00
mime mime/quotedprintable: add examples 2016-08-29 17:39:21 +00:00
net net/http: make DefaultTransport's Dialer enable DualStack ("Happy Eyeballs") 2016-08-31 00:44:55 +00:00
os all: use testing.GoToolPath instead of "go" 2016-08-30 22:49:11 +00:00
path path/filepath: handle ".." in normalizing a path on Windows 2016-08-30 20:01:49 +00:00
reflect reflect: cleanup wording for type identity/equality 2016-08-30 22:40:52 +00:00
regexp regexp: add some tests that were fixed in #12980 2016-08-16 18:36:43 +00:00
runtime runtime: rename fastrand1 to fastrand 2016-08-30 23:59:21 +00:00
sort
strconv strconv: clarify doc for Atoi return type 2016-06-28 18:16:25 +00:00
strings strings: add special cases for Join of 2 and 3 strings 2016-08-16 00:33:15 +00:00
sync cmd/compile: intrinsify sync/atomic for amd64 2016-08-30 15:23:23 +00:00
syscall syscall: fix plan9/386 RawSyscall6 2016-08-26 00:20:34 +00:00
testing testing: respect benchtime on very fast benchmarks 2016-08-10 19:44:08 +00:00
text text/template: remove unused Tree.parse return value 2016-08-17 22:36:27 +00:00
time time: Add Until helper function 2016-08-30 00:10:47 +00:00
unicode unicode: upgrade to version 9.0.0 2016-06-28 15:08:11 +00:00
unsafe unsafe: document use of &^ to round/align pointers 2016-08-18 16:45:17 +00:00
vendor/golang_org/x/net vendor: update vendored route 2016-08-24 00:14:58 +00:00
Make.dist
all.bash
all.bat
all.rc
androidtest.bash androidtest.bash: use go list to get pkg dir 2016-08-29 15:24:39 +00:00
bootstrap.bash
buildall.bash
clean.bash
clean.bat
clean.rc
cmp.bash
iostest.bash
make.bash build: unset GOBIN during build 2016-05-19 18:40:53 +00:00
make.bat build: unset GOBIN during build 2016-05-19 18:40:53 +00:00
make.rc build: unset GOBIN during build 2016-05-19 18:40:53 +00:00
naclmake.bash
nacltest.bash
race.bash
race.bat
run.bash build: unset GOBIN during build 2016-05-19 18:40:53 +00:00
run.bat build: unset GOBIN during build 2016-05-19 18:40:53 +00:00
run.rc build: unset GOBIN during build 2016-05-19 18:40:53 +00:00