/* Module to encrypt message with sha512 method */ #include "crypt.h" #include "sha512crypt.h" void Crypt::_bind_methods() { ClassDB::bind_method(D_METHOD("encrypt", "key", "salt") , &Crypt::encrypt); } Crypt::Crypt() { } Crypt::~Crypt() { // add your cleanup here } void Crypt::_init() { // initialize any variables here } String Crypt::encrypt(String key, String salt) { String out = ""; char * res = sha512_crypt (key.ascii().get_data(), salt.ascii().get_data()); out = res; return out; }