Class: Rex::Proto::Kerberos::CredentialCache::Principal
- Defined in:
- lib/rex/proto/kerberos/credential_cache/principal.rb
Overview
This class provides a representation of a Principal stored in the Kerberos Credential Cache.
Instance Attribute Summary collapse
Instance Method Summary collapse
-
#encode ⇒ String
Encodes the Rex::Proto::Kerberos::CredentialCache::Principal into an String.
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
#components ⇒ Array<String>
17 18 19 |
# File 'lib/rex/proto/kerberos/credential_cache/principal.rb', line 17 def components @components end |
#name_type ⇒ Fixnum
11 12 13 |
# File 'lib/rex/proto/kerberos/credential_cache/principal.rb', line 11 def name_type @name_type end |
#realm ⇒ String
14 15 16 |
# File 'lib/rex/proto/kerberos/credential_cache/principal.rb', line 14 def realm @realm end |
Instance Method Details
#encode ⇒ String
Encodes the Rex::Proto::Kerberos::CredentialCache::Principal into an String
22 23 24 25 26 27 28 29 30 |
# File 'lib/rex/proto/kerberos/credential_cache/principal.rb', line 22 def encode encoded = '' encoded << encode_name_type encoded << [components.length].pack('N') encoded << encode_realm encoded << encode_components encoded end |