Created
December 24, 2017 22:35
-
-
Save NickNaso/c97df8ef7482bf3202520bf0af87d1cd to your computer and use it in GitHub Desktop.
bcrypt-napi init
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Napi::Object init(Napi::Env env, Napi::Object exports) { | |
exports.Set(Napi::String::New(env, "gen_salt_sync"), Napi::Function::New(env, GenerateSaltSync)); | |
exports.Set(Napi::String::New(env, "encrypt_sync"), Napi::Function::New(env, EncryptSync)); | |
exports.Set(Napi::String::New(env, "compare_sync"), Napi::Function::New(env, CompareSync)); | |
exports.Set(Napi::String::New(env, "get_rounds"), Napi::Function::New(env, GetRounds)); | |
exports.Set(Napi::String::New(env, "gen_salt"), Napi::Function::New(env, GenerateSalt)); | |
exports.Set(Napi::String::New(env, "encrypt"), Napi::Function::New(env, Encrypt)); | |
exports.Set(Napi::String::New(env, "compare"), Napi::Function::New(env, Compare)); | |
return exports; | |
}; | |
NODE_API_MODULE(bcrypt_napi, init); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment