Class: Rex::Proto::Kerberos::CredentialCache::Time

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

Overview

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

#auth_timeInteger

Returns:

  • (Integer)

11
12
13
# File 'lib/rex/proto/kerberos/credential_cache/time.rb', line 11

def auth_time
  @auth_time
end

#end_timeInteger

Returns:

  • (Integer)

17
18
19
# File 'lib/rex/proto/kerberos/credential_cache/time.rb', line 17

def end_time
  @end_time
end

#renew_tillInteger

Returns:

  • (Integer)

20
21
22
# File 'lib/rex/proto/kerberos/credential_cache/time.rb', line 20

def renew_till
  @renew_till
end

#start_timeInteger

Returns:

  • (Integer)

14
15
16
# File 'lib/rex/proto/kerberos/credential_cache/time.rb', line 14

def start_time
  @start_time
end

Instance Method Details

#encodeString

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

Returns:

  • (String)

    encoded time


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

def encode
  encoded = ''
  encoded << encode_auth_time
  encoded << encode_start_time
  encoded << encode_end_time
  encoded << encode_renew_time

  encoded
end