What's the proper way of setting the salt for cookies in Kohana 3?

I could just dive into the Kohana_Cookie class and set

public static $salt = 'blah';

But this doesn't seem like a very elegant solution... is there a propper way to set it in a config or such? Tried Googling around, but no luck...


Either set it in bootstrap:

Cookie::$salt = 'foobar';

Or extend the cookie class like @davgothic says.

Don't modify code in your system folder. There's never a need to do that.

It can be done by creating a cookie.php file in application/classes with the following contents:

class Cookie extends Kohana_Cookie
    public static $salt = 'foobar';
} // End Cookie

I would advise going with zombor's approach below though.

Need Your Help

Set flash parameter AllowScriptAccess to 'sameDomain' instead 'always'

javascript primefaces

I am using prime faces jar in my web application. The prime faces jar contain utility.js file.

Backbone.js and jQuery Mobile, function everytime a view is loaded

jquery-mobile backbone.js

I have a 4 page jquery mobile/backbone.js app. I want to run a function to populate some inputs with an ajax call everytime a certain page is loaded. I know I can do the call on render but that i...

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.