Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckScrambledPassword ¶
CheckScrambledPassword check scrambled password received from client. The new authentication is performed in following manner:
SERVER: public_seed=create_random_string() send(public_seed) CLIENT: recv(public_seed) hash_stage1=sha1("password") hash_stage2=sha1(hash_stage1) reply=xor(hash_stage1, sha1(public_seed,hash_stage2) // this three steps are done in scramble() send(reply) SERVER: recv(reply) hash_stage1=xor(reply, sha1(public_seed,hash_stage2)) candidate_hash2=sha1(hash_stage1) check(candidate_hash2==hash_stage2) // this three steps are done in check_scramble()
func DecodePassword ¶
DecodePassword converts hex string password without prefix '*' to byte array.
func EncodePassword ¶
EncodePassword converts plaintext password to hashed hex string.
Types ¶
type UserIdentity ¶
UserIdentity represents username and hostname.
func (*UserIdentity) String ¶
func (user *UserIdentity) String() string
String converts UserIdentity to the format user@host.
Click to show internal directories.
Click to hide internal directories.