Forum Discussion

Deb_Allen_18's avatar
Deb_Allen_18
Historic F5 Account
Mar 18, 2006

output of [string range [AES::key 128] 8 end]?

I see this code (in fact used it several times) for generating a random cookie value:

 

 


[string range [AES::key 128] 8 end]

 

 

Anybody know why you'd want to whack the first 8 characters of the key value to use it in a cookie?

 

 

thanks

 

/deb

 

 

  • unRuleY_95363's avatar
    unRuleY_95363
    Historic F5 Account
    The first 8 characters are text used to identify the key. It usually looks something like "AES " where is the number of bits in the key (eg: 128 or 192 or 256) and is the hexadecimal digits representing the value of the key. Obviously you might not want to include the "AES 256 " part in the cookie.
  • Deb_Allen_18's avatar
    Deb_Allen_18
    Historic F5 Account
    Ah, thank you.

     

     

    I did some testing to look at the output, as you suggested, but didn't notice the difference in output as the loglines in the GUI wrapped right there at the 2nd space:

     

     

    Rule : AES_value AES 128

     

    ad3cefcb40d67e46af23c36bb9947f46

     

     

    Rule : string_range_8_value

     

    ad3cefcb40d67e46af23c36bb9947f46

     

     

    Doh!

     

    thanks alot!

     

     

    /d