Class: Rex::Proto::Kerberos::Model::EncApRepPart
- Defined in:
- lib/rex/proto/kerberos/model/enc_ap_rep_part.rb
Overview
This class provides a representation of an EncAPRepPart, sent as the encrypted part of an AP-REP message
Constant Summary
Constants included from Rex::Proto::Kerberos::Model
AP_REP, AP_REQ, AS_REP, AS_REQ, AUTHENTICATOR, ENC_KRB_CRED_PART, KRB_CRED, KRB_ERROR, TGS_REP, TGS_REQ, TICKET, VERSION
Instance Attribute Summary collapse
-
#ctime ⇒ Time
The current time of the client’s host.
-
#cusec ⇒ Integer
The microsecond part of the client’s timestamp.
-
#sequence_number ⇒ Integer
The initial sequence number to be used for future communications.
-
#subkey ⇒ Rex::Proto::Kerberos::Model::EncryptionKey
key which is to be used to protect this specific application session.
Instance Method Summary collapse
-
#decode(input) ⇒ self
Decodes the Rex::Proto::Kerberos::Model::EncApRepPart from an input.
-
#encode ⇒ String
Encodes the Rex::Proto::Kerberos::Model::EncApRepPart into an ASN.1 String.
Methods inherited from Element
attr_accessor, attributes, #attributes, decode, #initialize
Constructor Details
This class inherits a constructor from Rex::Proto::Kerberos::Model::Element
Instance Attribute Details
#ctime ⇒ Time
Returns The current time of the client’s host.
12 13 14 |
# File 'lib/rex/proto/kerberos/model/enc_ap_rep_part.rb', line 12 def ctime @ctime end |
#cusec ⇒ Integer
Returns The microsecond part of the client’s timestamp.
15 16 17 |
# File 'lib/rex/proto/kerberos/model/enc_ap_rep_part.rb', line 15 def cusec @cusec end |
#sequence_number ⇒ Integer
Returns The initial sequence number to be used for future communications.
22 23 24 |
# File 'lib/rex/proto/kerberos/model/enc_ap_rep_part.rb', line 22 def sequence_number @sequence_number end |
#subkey ⇒ Rex::Proto::Kerberos::Model::EncryptionKey
key which is to be used to protect this specific application session
19 20 21 |
# File 'lib/rex/proto/kerberos/model/enc_ap_rep_part.rb', line 19 def subkey @subkey end |
Instance Method Details
#decode(input) ⇒ self
Decodes the Rex::Proto::Kerberos::Model::EncApRepPart from an input
29 30 31 32 33 34 35 36 37 38 39 40 |
# File 'lib/rex/proto/kerberos/model/enc_ap_rep_part.rb', line 29 def decode(input) case input when String decode_string(input) when OpenSSL::ASN1::ASN1Data decode_asn1(input) else raise ::Rex::Proto::Kerberos::Model::Error::KerberosDecodingError, 'Failed to decode EncApRepPart, invalid input' end self end |
#encode ⇒ String
Encodes the Rex::Proto::Kerberos::Model::EncApRepPart into an ASN.1 String
45 46 47 |
# File 'lib/rex/proto/kerberos/model/enc_ap_rep_part.rb', line 45 def encode raise ::NotImplementedError, 'EncApRepPart encoding not supported' end |