diff --git a/modules/encoders/hash/bcrypt/bcrypt.pp b/modules/encoders/hash/bcrypt/bcrypt.pp new file mode 100644 index 000000000..e69de29bb diff --git a/modules/encoders/hash/bcrypt/manifests/.no_puppet b/modules/encoders/hash/bcrypt/manifests/.no_puppet new file mode 100644 index 000000000..e69de29bb diff --git a/modules/encoders/hash/bcrypt/secgen_local/local.rb b/modules/encoders/hash/bcrypt/secgen_local/local.rb new file mode 100644 index 000000000..d4335c8c8 --- /dev/null +++ b/modules/encoders/hash/bcrypt/secgen_local/local.rb @@ -0,0 +1,16 @@ +#!/usr/bin/ruby +require_relative '../../../../../lib/objects/local_hash_encoder.rb' + +class BCryptEncoder < HashEncoder + def initialize + super + self.module_name = 'BCrypt Hash Encoder' + end + + def hash_function(string) + require 'bcrypt' + BCrypt::Password.create(string) + end +end + +BCryptEncoder.new.run diff --git a/modules/encoders/hash/bcrypt/secgen_metadata.xml b/modules/encoders/hash/bcrypt/secgen_metadata.xml new file mode 100644 index 000000000..e4c42d44b --- /dev/null +++ b/modules/encoders/hash/bcrypt/secgen_metadata.xml @@ -0,0 +1,22 @@ + + + + Bcrypt Hash Encoder + Thomas Shaw + MIT + Generates an bcrypt hash for each of the strings. + + hash + bcrypt + linux + windows + + strings_to_encode + salt + return_salts + + string + + \ No newline at end of file