Documentation ¶
Index ¶
- Constants
- func AsymmetricPrivateKeyDecryption(privKey_str []byte, cipherText []byte) string
- func AsymmetricPublicKeyEncryption(key []byte, message []byte) []byte
- func ConvertStringPrivKeyToRsaKey(privPEM []byte) (*rsa.PrivateKey, error)
- func ConvertStringPubKeyToRsaKey(pubPEM []byte) (*rsa.PublicKey, error)
- func GenerateRandomKey() []byte
- func GetDecrypted(ciphertext []byte, key *rsa.PrivateKey) []byte
- func GetEncrypted(message []byte, key *rsa.PublicKey) []byte
- func InitRSA(pubFilename string, privFilename string) ([]byte, []byte)
- func RandomString(n int) string
- func SymmetricDecryption(key []byte, cipherText []byte) string
- func SymmetricEncryption(key string, message string) []byte
- type Request
- type Response
Constants ¶
View Source
const CLIENTS_LIST = "clients_list"
View Source
const CLIENT_MESSAGE = "message"
View Source
const CONNECTION_SUCCESSFUL = "connection_successful"
View Source
const ERROR = "error"
View Source
const GET_CLIENTS = "get_clients"
View Source
const LOGIN = "login"
View Source
const LOGIN_SUCCESS = "login_success"
View Source
const NONE = "NONE"
View Source
const SELECT_TARGET = "selectTarget"
View Source
const SERVER_KEY_ACK = "server_key_ack"
View Source
const SERVER_KEY_EXCHANGE = "server_key_exchange"
View Source
const SIGNUP = "signup"
View Source
const SIGNUP_FAILURE = "signupfailure"
View Source
const SIGNUP_SUCCESSFUL = "signupsuccess"
View Source
const TARGET_FAIL = "targetFail"
View Source
const TARGET_NOT_SET = "target_not_set"
View Source
const TARGET_SET = "targetset"
Variables ¶
This section is empty.
Functions ¶
func ConvertStringPrivKeyToRsaKey ¶
func ConvertStringPrivKeyToRsaKey(privPEM []byte) (*rsa.PrivateKey, error)
func GenerateRandomKey ¶
func GenerateRandomKey() []byte
func GetDecrypted ¶
func GetDecrypted(ciphertext []byte, key *rsa.PrivateKey) []byte
func RandomString ¶
func SymmetricDecryption ¶
func SymmetricEncryption ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.