{"action":"closed","issue":{"url":"https://api.github.com/repos/jayralencar/sqlite-cipher.js/issues/7","repository_url":"https://api.github.com/repos/jayralencar/sqlite-cipher.js","labels_url":"https://api.github.com/repos/jayralencar/sqlite-cipher.js/issues/7/labels{/name}","comments_url":"https://api.github.com/repos/jayralencar/sqlite-cipher.js/issues/7/comments","events_url":"https://api.github.com/repos/jayralencar/sqlite-cipher.js/issues/7/events","html_url":"https://github.com/jayralencar/sqlite-cipher.js/issues/7","id":150542665,"number":7,"title":"Check encrypted database password","user":{"login":"asanchezgomez","id":13104857,"avatar_url":"https://avatars.githubusercontent.com/u/13104857?v=3","gravatar_id":"","url":"https://api.github.com/users/asanchezgomez","html_url":"https://github.com/asanchezgomez","followers_url":"https://api.github.com/users/asanchezgomez/followers","following_url":"https://api.github.com/users/asanchezgomez/following{/other_user}","gists_url":"https://api.github.com/users/asanchezgomez/gists{/gist_id}","starred_url":"https://api.github.com/users/asanchezgomez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/asanchezgomez/subscriptions","organizations_url":"https://api.github.com/users/asanchezgomez/orgs","repos_url":"https://api.github.com/users/asanchezgomez/repos","events_url":"https://api.github.com/users/asanchezgomez/events{/privacy}","received_events_url":"https://api.github.com/users/asanchezgomez/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":12,"created_at":"2016-04-23T10:41:09Z","updated_at":"2016-05-02T11:45:15Z","closed_at":"2016-05-02T11:45:15Z","body":"Hi again @jayralencar !\r\n\r\nIt is possible to check if a specific password is the correct for a encrypted database?\r\n\r\nI thought  that if you try to connect to a database with a wrong password, your package will throw a Sqlite error, but it does not happen. I'm playing with the next little example:\r\n\r\n```\r\nvar sqlite = require('sqlite-cipher');\r\n\r\nsqlite.connect('myEncrypedFile.db','MyPassword');\r\nsqlite.connect('myEncrypedFile.db','MyPassword2');\r\nconsole.log(\"without SQLITE error\");\r\n\r\nsqlite.run(\"CREATE TABLE COMPANYS(ID  INTEGER PRIMARY KEY AUTOINCREMENT, NAME TEXT NOT NULL);\");\r\nconsole.log(\"without SQLITE error\");\r\n\r\nsqlite.insert(\"COMPANYS\",{NAME:\"My COMPANY\"});\r\nconsole.log(\"SQLITE error: file is encrypted or is not a database\");\r\n```\r\nI don't know if you could make a method for testing a password or if you could recommend me a way to do it with the current version.\r\n\r\nThanks for your effort!"}}