Class: Reedb::SecurityUtils

Inherits:
Object
  • Object
show all
Defined in:
lib/reedb/security/encryption.rb

Class Method Summary collapse

Class Method Details

.name_col_hash(string) ⇒ Object



56
57
58
# File 'lib/reedb/security/encryption.rb', line 56

def self.name_col_hash(string)
	return "---#{string}"
end

.sha512_hash(string) ⇒ Object

> Returns 64 byte sha hash.

DO NOT USE FOR PASSWORD HASHING! Used for integrety checking files



52
53
54
# File 'lib/reedb/security/encryption.rb', line 52

def self.sha512_hash(string)
	return Digest::SHA256.hexdigest("#{string}")
end

.tiger_hash(string) ⇒ Object

> Returns 190 bit tiger hash

DO NOT USE FOR PASSWORD HASHING! Used to hash file-names in vaults



44
45
46
# File 'lib/reedb/security/encryption.rb', line 44

def self.tiger_hash(string)
	return Digest::Tiger.hexdigest("#{string}")
end