Given a (packed) RADIUS packet and a shared secret, returns a new packet
with the authenticator field changed in accordance with RADIUS protocol
requirements.
Parameters
packed_packet:
The packed packet to compute a new Authenticator field for.
secret:
The shared secret of the RADIUS system.
Return value
a new packed packet with the authenticator field recomputed.
Given a raw RADIUS packet data, unpacks its contents so it can be
analyzed with other methods, (e.g. code, attr, etc.). It
also clears all present attributes.
The Radius::Packet object contains attributes
that can be set and altered with the object's accessor methods, or obtained
from the unpack method. This method will return a raw RADIUS packet that
should be suitable for sending to a RADIUS client or server over UDP as per
RFC 2138.
Return Value
The RADIUS packet corresponding to the object's current internal state.
This method will pass each vendor-specific attribute available to a passed
block. The parameters to the block are the vendor ID, the attribute name,
and the attribute value.
The RADIUS User-Password attribute is encoded with a shared secret. This
method will return the decoded version given the shared secret. This also
works when the attribute name is 'Password' for compatibility reasons.
The RADIUS User-Password attribute is encoded with a shared secret. This
method will prepare the encoded version of the password. Note that this
method always stores the encrypted password in the 'User-Password'
attribute. Some (non-RFC 2138-compliant) servers have been reported that
insist on using the 'Password' attribute instead.
This method will convert a RADIUS packet into a printable string. Any
fields in the packet that might possibly contain non-printable characters
are turned into Base64 strings.
Parameters
secret:
The shared secret of the RADIUS system. Pass nil if
you don't want to see User-Password attributes decoded.