Skip to content

Commit

Permalink
kms: fix API key examples
Browse files Browse the repository at this point in the history
Signed-off-by: Andreas Auernhammer <[email protected]>
  • Loading branch information
aead committed Dec 28, 2023
1 parent 7f3bb2e commit ed49d62
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions kms/example_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,21 @@ import (
)

func ExampleParseAPIKey() {
key, err := kms.ParseAPIKey("AGaV6VXHasF0FnaB60WdCOeTZ8eTIDikL4zlN16c8NAs")
key, err := kms.ParseAPIKey("k1:d7cY/5k8HbBGkZpoy2hGmvkxg83QDBXsA/nFXDfTk2E")
if err != nil {
log.Fatal(err)
}
fmt.Println(key)
// Output:
// AGaV6VXHasF0FnaB60WdCOeTZ8eTIDikL4zlN16c8NAs
// k1:d7cY/5k8HbBGkZpoy2hGmvkxg83QDBXsA/nFXDfTk2E
}

func ExampleAPIKey_Identity() {
key, err := kms.ParseAPIKey("AGaV6VXHasF0FnaB60WdCOeTZ8eTIDikL4zlN16c8NAs")
key, err := kms.ParseAPIKey("k1:d7cY/5k8HbBGkZpoy2hGmvkxg83QDBXsA/nFXDfTk2E")
if err != nil {
log.Fatal(err)
}
fmt.Println(key.Identity())
// Output:
// ea9826089311fe44d7590408ede9150f7c637b6cab0a91ee6fe1aa5d9fb366f6
// h1:Rvxa7nj8zkL48CeDkN6LhpX+K7KK6uhIhpBOcTHNhWw
}

0 comments on commit ed49d62

Please sign in to comment.