Documentation
¶
Index ¶
- Constants
- Variables
- func RsaDecrypt(priv *rsa.PrivateKey, cipher []byte) ([]byte, error)
- func RsaEncrypt(pub *rsa.PublicKey, origin []byte) ([]byte, error)
- func RsaPriv(privateKey []byte) (*rsa.PrivateKey, error)
- func RsaPub(publicKey []byte) (*rsa.PublicKey, error)
- func RsaSign(priv *rsa.PrivateKey, text []byte) ([]byte, error)
- func RsaVerify(pub *rsa.PublicKey, text []byte, sig []byte) error
- type Base
- type Ext
- type Session
Constants ¶
View Source
const ( SignLoginRetryTimes = "s_login_retry_times" SignHostname = "s_hostname" )
Syscall(s)
Variables ¶
View Source
var ( ErrSyscallError = errors.New("Syscall Error") ErrAuthProtocol = errors.New("Auth Protocol Error") ErrKeyError = errors.New("Key Error") )
error(s)
View Source
var (
PromptTpl, _ = template.New("Prompt").Parse(fmt.Sprintf("\n%s {{ .User }} @ {{ .Host }} in {{ .PWD }} [{{ .Time }}] {{ .Error }}", glog.Blue("#")))
Prompt = glog.Red("$") + " "
)
Prompt
Functions ¶
func RsaDecrypt ¶
func RsaDecrypt(priv *rsa.PrivateKey, cipher []byte) ([]byte, error)
RsaDecrypt - 解密
func RsaEncrypt ¶
RsaEncrypt - 加密
Types ¶
Source Files
¶
Click to show internal directories.
Click to hide internal directories.