miggor-StreamGraph/addons/no-obs-ws/Authenticator.gd
Lera Elvoé b55a462945 Add OBS and Twitch nodes. Improve UX significantly. Rework groups from the ground up with a new instancing feature. Open to the public. (#18)
After months of work and over a hundred commits on this repo alone (not to mention the old, half-working repos on GitHub), StreamGraph is finally ready to be shown to the public, even if in an incomplete state.

This PR is a culmination of numerous design discussions, re-writes, and hours spent by both @Eroax and myself.

Reviewed-on: https://codeberg.org/Eroax/StreamGraph/pulls/18
Co-authored-by: Lera Elvoé <yagich@poto.cafe>
Co-committed-by: Lera Elvoé <yagich@poto.cafe>
2023-12-15 21:44:25 +00:00

16 lines
532 B
GDScript

extends RefCounted
# The result of the authentication string creation process. Use getter for public access.
var _auth_string: String:
get = get_auth_string
func _init(password: String, challenge: String, salt: String) -> void:
var salted := password + salt
var base64_secret := Marshalls.raw_to_base64(salted.sha256_buffer())
var b64_secret_plus_challenge = base64_secret + challenge
_auth_string = Marshalls.raw_to_base64(b64_secret_plus_challenge.sha256_buffer())
func get_auth_string() -> String:
return _auth_string