Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
edithli committed May 16, 2016
2 parents 03d3e7e + ed7214e commit c2022ab
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 6 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
pm-server/.idea/workspace.xml
pm-server/.idea/
pm-server/out/
4 changes: 2 additions & 2 deletions background.js
Original file line number Diff line number Diff line change
Expand Up @@ -264,13 +264,13 @@ function test() {
function encryptPwd(mpw, plaintext){ // @TODO: debug!!!!!!!!!!!!!!!!
var arr = encodePwd(plaintext);
var ctbits = encrypt(mpw, arr);
return sjcl.codec.hex.fromBits(ctbits);
return sjcl.codec.base64.fromBits(ctbits);
// return ctbits;
}

function decryptPwd(mpw, ciphertext){
// var arr = decrypt(mpw, ciphertext);
var arr = decrypt(mpw, sjcl.codec.hex.toBits(ciphertext));
var arr = decrypt(mpw, sjcl.codec.base64.toBits(ciphertext));
return decodePwd(arr);
}

Expand Down
8 changes: 8 additions & 0 deletions db_file.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
CREATE TABLE `pm-extension`.`user_info` (
`username` VARCHAR(255) NOT NULL,
`password_hint` VARCHAR(255) NOT NULL,
`cipher_checksum` VARCHAR(255) NOT NULL,
PRIMARY KEY (`username`),
UNIQUE INDEX `username_UNIQUE` (`username` ASC))
ENGINE = InnoDB
DEFAULT CHARACTER SET = utf8;
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
/**
* Created by lss on 2016/5/9.
*/
@WebServlet("/AddUserServlet")
public class AddUserServlet extends HttpServlet{
public AddUserServlet(){
@WebServlet("/AddAccountServlet")
public class AddAccountServlet extends HttpServlet{
public AddAccountServlet(){
super();
}

Expand Down

0 comments on commit c2022ab

Please sign in to comment.