test-client-godot/gdnative/test/crypt.gd

26 lines
733 B
GDScript3

#extends Node
# Declare member variables here. Examples:
# var a = 2
# var b = "text"
# Called when the node enters the scene tree for the first time.
func _ready():
pass
func test():
print("[crypt] Start check -> start")
#var crypt = load("res://crypt.gdns").new()
var crypt = Crypt.new()
var salt = "$6$mZ3k4xrnvjLM8dV6"
var password = "tester"
var crypted = crypt.encrypt(password, salt)
assert(crypted == "$6$mZ3k4xrnvjLM8dV6$EbOqHNpkzyniUgcf19E2JZHB3bl9.7sWN.ChIjtUiuMtsJIbINbYA0//HRWiKB2U6c7NniJgiACmidYBtsnJ71")
print("[crypt] Start check -> end")
# Called every frame. 'delta' is the elapsed time since the previous frame.
#func _process(delta):
# pass
func _exit_tree():
pass