Class: Rex::Proto::Kerberos::CredentialCache::Cache

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

Overview

This class provides a representation of a 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

#credentialsArray<Rex::Proto::Kerberos::CredentialCache::Credential>

Returns The primary principal credentials.

Returns:


21
22
23
# File 'lib/rex/proto/kerberos/credential_cache/cache.rb', line 21

def credentials
  @credentials
end

#headersArray<String>

Returns The header tags.

Returns:

  • (Array<String>)

    The header tags


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

def headers
  @headers
end

#primary_principalRex::Proto::Kerberos::CredentialCache::Principal

Returns The principal cache's owner.

Returns:


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

def primary_principal
  @primary_principal
end

#versionInteger

Returns The file format version.

Returns:

  • (Integer)

    The file format version


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

def version
  @version
end

Instance Method Details

#encodeString

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

Returns:

  • (String)

    encoded cache


26
27
28
29
30
31
32
# File 'lib/rex/proto/kerberos/credential_cache/cache.rb', line 26

def encode
  encoded = ''
  encoded << encode_version
  encoded << encode_headers
  encoded << encode_primary_principal
  encoded << encode_credentials
end