Class: Rex::Proto::Kerberos::CredentialCache::KeyBlock

Inherits:
Element
  • Object
show all
Defined in:
lib/rex/proto/kerberos/credential_cache/key_block.rb

Overview

This class provides a representation of a credential keys stored in the Kerberos Credential Cache.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Element

attr_accessor, attributes, #attributes, #initialize

Constructor Details

This class inherits a constructor from Rex::Proto::Kerberos::CredentialCache::Element

Instance Attribute Details

#e_typeInteger

Returns:

  • (Integer)

15
16
17
# File 'lib/rex/proto/kerberos/credential_cache/key_block.rb', line 15

def e_type
  @e_type
end

#key_typeInteger

Returns:

  • (Integer)

12
13
14
# File 'lib/rex/proto/kerberos/credential_cache/key_block.rb', line 12

def key_type
  @key_type
end

#key_valueString

Returns:

  • (String)

18
19
20
# File 'lib/rex/proto/kerberos/credential_cache/key_block.rb', line 18

def key_value
  @key_value
end

Instance Method Details

#encodeString

Encodes the Rex::Proto::Kerberos::CredentialCache::KeyBlock into an String

Returns:

  • (String)

    encoded key


23
24
25
26
27
28
29
30
# File 'lib/rex/proto/kerberos/credential_cache/key_block.rb', line 23

def encode
  encoded = ''
  encoded << encode_key_type
  encoded << encode_e_type
  encoded << encode_key_value

  encoded
end