From 73a07e7665ceb5ea35b33091e286774e4f5ab04e Mon Sep 17 00:00:00 2001 From: Gibheer Date: Wed, 14 Jan 2015 21:42:37 +0100 Subject: add api for public keys This enables pkictl to generate public keys from private keys in the rsa and ecdsa format. --- private_key.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'private_key.go') 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 -- cgit v1.2.3-70-g09d2