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

22 lines
674 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 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