X-Git-Url: https://git.r.bdr.sh/rbdr/mobius/blobdiff_plain/d9bc63a10d0978d9a5222cf7be74044e55f409b7..c28fb3985c82544084a84d0d91c69fd102174a36:/hotline/user.go?ds=sidebyside diff --git a/hotline/user.go b/hotline/user.go index f3754d3..c4e0790 100644 --- a/hotline/user.go +++ b/hotline/user.go @@ -84,10 +84,10 @@ func (u *User) Write(p []byte) (int, error) { return 8 + namelen, nil } -// encodeString takes []byte s containing cleartext and rotates by 255 into obfuscated cleartext. +// EncodeString takes []byte s containing cleartext and rotates by 255 into obfuscated cleartext. // The Hotline protocol uses this format for sending passwords over network. // Not secure, but hey, it was the 90s! -func encodeString(clearText []byte) []byte { +func EncodeString(clearText []byte) []byte { obfuText := make([]byte, len(clearText)) for i := 0; i < len(clearText); i++ { obfuText[i] = 255 - clearText[i]