示例#1
0
func ParseHelloKey(s string) (hk *HelloKey, err os.Error) {
	rsapriv, err := rsa64.Base64ToPriv(s)
	if err != nil {
		return nil, err
	}
	return &HelloKey{rsapriv}, nil
}
示例#2
0
文件: msg.go 项目: fedgrant/tonika
// TODO: Add length checks
func ParseCipherMsgKey(s string) (k *CipherMsgKey, err os.Error) {
	rsapriv, err := rsa64.Base64ToPriv(s)
	if err != nil {
		return nil, err
	}
	return &CipherMsgKey{rsapriv}, nil
}
示例#3
0
文件: sigkey.go 项目: fedgrant/tonika
// TODO: Add length checks
func ParseSigKey(s string) (sk *SigKey, err os.Error) {
	rsapriv, err := rsa64.Base64ToPriv(s)
	if err != nil {
		return nil, err
	}
	return &SigKey{rsapriv}, nil
}