Commit 0f5dabee authored by David Stainton's avatar David Stainton

Java: rename to KeyFromBase64

parent 4eb2be8d
......@@ -18,7 +18,7 @@
package client
import (
"encoding/hex"
"encoding/base64"
"github.com/katzenpost/core/crypto/ecdh"
"github.com/katzenpost/core/crypto/rand"
......@@ -41,10 +41,10 @@ func GenKey() (*Key, error) {
}
// StringToKey builds a Key from a string
func KeyFromString(keyStr string) (*Key, error) {
func KeyFromBase64(keyStr string) (*Key, error) {
var key ecdh.PrivateKey
keyBytes, err := hex.DecodeString(keyStr)
keyBytes, err := base64.StdEncoding.DecodeString(keyStr)
if err != nil {
return &Key{}, err
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment