libtins  3.4
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Pages
Public Types | Public Member Functions | List of all members
Tins::Crypto::WEPDecrypter Class Reference

Decrypts WEP-encrypted traffic. More...

#include <crypto.h>

Public Types

typedef HWAddress< 6 > address_type
 

Public Member Functions

 WEPDecrypter ()
 Constructs a WEPDecrypter object.
 
void add_password (const address_type &addr, const std::string &password)
 Adds a decryption password. More...
 
void remove_password (const address_type &addr)
 Removes a decryption password. More...
 
bool decrypt (PDU &pdu)
 Decrypts the provided PDU. More...
 

Detailed Description

Decrypts WEP-encrypted traffic.

Member Function Documentation

void Tins::Crypto::WEPDecrypter::add_password ( const address_type addr,
const std::string &  password 
)

Adds a decryption password.

Parameters
addrThe access point's BSSID.
passwordThe password which will be used to decrypt packets sent from and to the AP identifier by the BSSID addr.
bool Tins::Crypto::WEPDecrypter::decrypt ( PDU pdu)

Decrypts the provided PDU.

A Dot11Data PDU is looked up inside the provided PDU chain. If no such PDU exists or there is no password associated with the Dot11 packet's BSSID, then the PDU is left intact.

Otherwise, the packet is decrypted using the given password. If the CRC found after decrypting is invalid, false is returned.

Returns
false if no decryption was performed or decryption failed, true otherwise.
void Tins::Crypto::WEPDecrypter::remove_password ( const address_type addr)

Removes a decryption password.

Parameters
addrThe BSSID of the access point.

The documentation for this class was generated from the following file: