IBM / keyprotect-go-client

Go SDK for interacting with the IBM Cloud KeyProtect service.
Apache License 2.0
6 stars 29 forks source link

Example code: plaintext not base64 encoded #20

Closed ghost closed 4 years ago

ghost commented 4 years ago

https://github.com/IBM/keyprotect-go-client/blob/0acf853f183cf6deaa57737ae16c45b812bec1bb/examples/main.go#L93-L94

The plaintext that is being passed to Wrap is not base64 encoded causing an error on run of the example code.

mrodden commented 4 years ago

That example file is old and probably totally broken yes. I am leaning towards just removing it.

ghost commented 4 years ago

Makes sense.

In case you missed it this was in response to someone posting in key protect channel:

Hi, I ran the key protect go client (https://github.com/IBM/keyprotect-go-client) and i've gotten error when I run it Wrapping root key Error wrapping the key: illegal base64 data at input byte 4 For environment: I did: go get github.com/IBM/keyprotect-go-client then added my api credentials + guid to example/main.go and built that into an executable

mrodden commented 4 years ago

Yeah I did see that afterwards... I think we should remove the examples folder and do something else.