From 80db488cbdbd7a35f61526f8581d806849703298 Mon Sep 17 00:00:00 2001 From: Gibheer Date: Thu, 19 Feb 2015 21:48:08 +0100 Subject: add public key loader This adds a way to restore a public key from any data source. --- rsa.go | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'rsa.go') diff --git a/rsa.go b/rsa.go index 9a4f298..1661163 100644 --- a/rsa.go +++ b/rsa.go @@ -56,6 +56,10 @@ func (pr RsaPrivateKey) MarshalPem() (marshalledPemBlock, error) { return pem.EncodeToMemory(&pem_block), nil } +func LoadPublicKeyRsa(raw []byte) (*RsaPublicKey, error) { + return nil, errors.New("not implemented yet!") +} + func (pu *RsaPublicKey) MarshalPem() (marshalledPemBlock, error) { asn1, err := x509.MarshalPKIXPublicKey(pu.public_key) if err != nil { return nil, err } -- cgit v1.2.3-70-g09d2