Skip to content

End of Life Ruby 3.1 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →

instance method

CGI::Session#create_new_id

create_new_id

Create a new session id.

The session id is a secure random number by SecureRandom if possible, otherwise an SHA512 hash based upon the time, a random number, and a constant string. This routine is used internally for automatically generated session ids.

See also #close #delete #[]= #update also in 3.4 · 3.3 · 3.2 · 3.0