Method: Rex::Proto::Kerberos::Model::KrbError#decode

Defined in:
lib/rex/proto/kerberos/model/krb_error.rb

#decode(input) ⇒ self

Decodes the Rex::Proto::Kerberos::Model::KrbError from an input

Parameters:

  • input (String, OpenSSL::ASN1::ASN1Data)

    the input to decode from

Returns:

  • (self)

    if decoding succeeds

Raises:



52
53
54
55
56
57
58
59
60
61
62
63
# File 'lib/rex/proto/kerberos/model/krb_error.rb', line 52

def decode(input)
  case input
  when String
    decode_string(input)
  when OpenSSL::ASN1::ASN1Data
    decode_asn1(input)
  else
    raise ::RuntimeError, 'Failed to decode KrbError, invalid input'
  end

  self
end