Disclaimer
The Author of this posting offers the information contained within this posting without consideration and with the reader's understanding that there's no implied or expressed suitability or fitness for any purpose. Information provided is for informational purposes only and should not be construed as rendering professional advice of any kind. Usage of this posting's information is solely at reader's own risk.
Liability Disclaimer
In no event shall Author be liable for any damages whatsoever (including, without limitation, damages for loss of use, data or profit) arising out of the use or inability to use the posting's information even if Author has been advised of the possibility of such damage.
Posting
A L2 Etherchannel would "look" at whatever L2 or L3 fields it's been configured to use for load balancing. If using SRC and/or DST MACs, it would "look" at those two fields within the L2 frame.
Exactly how hash values are generated, I believe, is considered proprietary information. Logically, though, the hash algorithm will derive a number, on most platforms between 0 and 7 and use it to "map" into the number of links. (On the platforms the derive a number between 0 and 7, your most even load balancing is accomplished by using a power of two number of links, i.e. 2, 4 or 8.)