Class: EFIValidate::EALFHeader
- Inherits:
-
Object
- Object
- EFIValidate::EALFHeader
- Defined in:
- lib/efivalidate/ealf_header.rb
Constant Summary collapse
- EALF_MAGIC =
'EALF'.freeze
- EALF_ROW_SIZE =
28
- EALF_HASH_FUNCTIONS =
{ 0 => { size: 20, function: -> { Digest::SHA1.new } }, 1 => { size: 32, funciton: -> { Digest::SHA2.new(256)} } }
- EALF_HASH_SHA1 =
0
- EALF_HASH_SHA256 =
1
Instance Method Summary collapse
Instance Method Details
#create_hash ⇒ Object
28 29 30 |
# File 'lib/efivalidate/ealf_header.rb', line 28 def create_hash EFIValidate::EALFHeader::EALF_HASH_FUNCTIONS[self.ealf_hash_function][:funciton].call end |
#hash_size ⇒ Object
24 25 26 |
# File 'lib/efivalidate/ealf_header.rb', line 24 def hash_size EFIValidate::EALFHeader::EALF_HASH_FUNCTIONS[self.ealf_hash_function][:size] end |
#row_size ⇒ Object
20 21 22 |
# File 'lib/efivalidate/ealf_header.rb', line 20 def row_size EALF_ROW_SIZE + self.hash_size end |