diff options
author | Gibheer <gibheer@gmail.com> | 2015-01-14 21:42:37 +0100 |
---|---|---|
committer | Gibheer <gibheer@gmail.com> | 2015-01-14 21:42:37 +0100 |
commit | 73a07e7665ceb5ea35b33091e286774e4f5ab04e (patch) | |
tree | 0b8a65ea11ccdc9d050afdd06da5df05fb498846 /private_key.go | |
parent | 0a7c8b863bee1572b90ca5d0a037efd1c6bcd54f (diff) |
add api for public keys
This enables pkictl to generate public keys from private keys in the rsa
and ecdsa format.
Diffstat (limited to 'private_key.go')
-rw-r--r-- | private_key.go | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/private_key.go b/private_key.go index ae5b90a..5e32ca8 100644 --- a/private_key.go +++ b/private_key.go @@ -1,6 +1,7 @@ package main import ( + "crypto" "crypto/elliptic" "crypto/ecdsa" "crypto/rand" @@ -15,7 +16,9 @@ import ( ) type ( - PrivateKey interface {} + PrivateKey interface { + Public() crypto.PublicKey + } CreateFlags struct { CryptType string // rsa or ecdsa |