James Moger
2011-04-13 94b96b5a98bef254128ccc4f5fc0e0c4376324e4
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
package com.gitblit.wicket;
 
import com.gitblit.Build;
import com.gitblit.Constants;
 
public class User {
    
    private String username;
    private char [] password;
    
    public User(String username, char [] password) {
        this.username = username;
        this.password = password;
    }
    
    public String getCookie() {
        return Build.getSHA1((Constants.NAME + username + new String(password)).getBytes());
    }
    
    public String toString() {
        return username;
    }
}