There's no function that wraps all of the
functionally needed to do this but it's
easy enough to write. See the attached file.
Anthony
> I'm not sure how I would use this to digitally sign a message with a
> private key.
Depending on your goals, you might find
https://github.com/abneptis/GoCryptools/blob/master/signer/pkcs15.go useful
> Thanks
>
Cheers,
James
I'm surprised 8g didn't complain about the
variable being declared and not used.
Anthony
Go doesn't complaint if you don't use a function parameter.
Functions will often have parameters they don't use because they are
satisfying an interface.
- jessta
--
=====================
http://jessta.id.au
Two identical functions need not have the same
identifier names in their signatures; in fact,
you can leave out the identifier if the function
doesn't use the corresponding parameter.
Relatedly, the identifier of a method receiver
can be omitted if it isn't used inside the
method.
I think it should be an error to give a name to
a function parameter and then not use it.
Anthony
No, sorry about that. The spec says I'm wrong.
But I still think it should go my way. ;)
Cheers,
Anthony
David
--
David Roundy
Nql641NHEUkUaXQHZINK1FZ~SYeUSoBJMxjdgqrzIdzV2gyEXPDNv0pYdWJkflDKJ3xIu7lbwRpSkG98NBlgPi4ZJpRRnVX4kXAJK6tdNx6FucDB7OVqzcxkxHsGFd8VCG1BkC-Afh9~lOCMIYHIaiOB6~5jt9w2EOwi6sIIqrg_
> Nql641NHEUkUaXQHZINK1FZ~SYeUSoBJMxjdgqrzIdzV2gyEXPDNv0pYdWJkflDKJ3xIu7lbwRpSkG98NBlgPi4ZJpRRnVX4kXAJK6tdNx6FucDB7OVqzcxkxHsGFd8VCG1BkC-Afh9~lOCMIYHIaiOB6~5jt9w2EOwi6sIIqrg_
convert it to base64, see encoding/base64, something ala:
b64 := make([]byte, base64.StdEncoding.EncodedLen(len(b)))
base64.StdEncoding.Encode(b64, b)
grtz Miek