| 81 | } |
| 82 | |
| 83 | func ExampleKeeper_Encrypt() { |
| 84 | // PRAGMA: This example is used on gocloud.dev; PRAGMA comments adjust how it is shown and can be ignored. |
| 85 | // PRAGMA: On gocloud.dev, hide lines until the next blank line. |
| 86 | ctx := context.Background() |
| 87 | var keeper *secrets.Keeper |
| 88 | |
| 89 | plainText := []byte("Secrets secrets...") |
| 90 | cipherText, err := keeper.Encrypt(ctx, plainText) |
| 91 | if err != nil { |
| 92 | log.Fatal(err) |
| 93 | } |
| 94 | |
| 95 | // PRAGMA: On gocloud.dev, hide the rest of the function. |
| 96 | _ = cipherText |
| 97 | } |
| 98 | |
| 99 | func ExampleKeeper_Decrypt() { |
| 100 | // PRAGMA: This example is used on gocloud.dev; PRAGMA comments adjust how it is shown and can be ignored. |