()
| 2439 | } |
| 2440 | |
| 2441 | func ExamplePipe_Hash() { |
| 2442 | sum, err := script.Echo("hello world").Hash(sha512.New()) |
| 2443 | if err != nil { |
| 2444 | panic(err) |
| 2445 | } |
| 2446 | fmt.Println(sum) |
| 2447 | // Output: |
| 2448 | // 309ecc489c12d6eb4cc40f50c902f2b4d0ed77ee511a7c7a9bcd3ca86d4cd86f989dd35bc5ff499670da34255b45b0cfd830e81f605dcf7dc5542e93ae9cd76f |
| 2449 | } |
| 2450 | |
| 2451 | func ExamplePipe_HashSums() { |
| 2452 | script.ListFiles("testdata/multiple_files").HashSums(sha256.New()).Stdout() |