mirror of
https://codeberg.org/StreamGraph/StreamGraph.git
synced 2024-11-13 19:49:55 +01:00
b55a462945
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>
16 lines
532 B
GDScript
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
|