mirror of
https://github.com/cliffe/SecGen.git
synced 2026-02-21 11:18:06 +00:00
encoders/hash/bcrypt
This commit is contained in:
0
modules/encoders/hash/bcrypt/bcrypt.pp
Normal file
0
modules/encoders/hash/bcrypt/bcrypt.pp
Normal file
0
modules/encoders/hash/bcrypt/manifests/.no_puppet
Normal file
0
modules/encoders/hash/bcrypt/manifests/.no_puppet
Normal file
16
modules/encoders/hash/bcrypt/secgen_local/local.rb
Normal file
16
modules/encoders/hash/bcrypt/secgen_local/local.rb
Normal file
@@ -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
|
||||
22
modules/encoders/hash/bcrypt/secgen_metadata.xml
Normal file
22
modules/encoders/hash/bcrypt/secgen_metadata.xml
Normal file
@@ -0,0 +1,22 @@
|
||||
<?xml version="1.0"?>
|
||||
|
||||
<encoder xmlns="http://www.github/cliffe/SecGen/encoder"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://www.github/cliffe/SecGen/encoder">
|
||||
<name>Bcrypt Hash Encoder</name>
|
||||
<author>Thomas Shaw</author>
|
||||
<module_license>MIT</module_license>
|
||||
<description>Generates an bcrypt hash for each of the strings.</description>
|
||||
|
||||
<type>hash</type>
|
||||
<type>bcrypt</type>
|
||||
<platform>linux</platform>
|
||||
<platform>windows</platform>
|
||||
|
||||
<read_fact>strings_to_encode</read_fact>
|
||||
<read_fact>salt</read_fact>
|
||||
<read_fact>return_salts</read_fact>
|
||||
|
||||
<output_type>string</output_type>
|
||||
|
||||
</encoder>
|
||||
Reference in New Issue
Block a user