metasploit-framework/lib/rex/proto/kerberos/pac/server_checksum.rb

30 lines
703 B
Ruby
Raw Normal View History

2014-12-15 23:16:43 +00:00
# -*- coding: binary -*-
module Rex
module Proto
module Kerberos
module Pac
# This class provides a representation of a PAC_SERVER_CHECKSUM structure, which contains the
# checksum using the key of the server.
2014-12-15 23:16:43 +00:00
class ServerChecksum < Element
# @!attribute version
# @return [Integer] The checksum type
2014-12-15 23:16:43 +00:00
attr_accessor :checksum
# Encodes the Rex::Proto::Kerberos::Pac::ServerChecksum
#
# @return [String]
def encode
encoded = ''
encoded << [checksum].pack('V')
encoded << "\x00" * 16
encoded
end
end
end
end
end
end