{"action":"created","issue":{"url":"https://api.github.com/repos/travist/jsencrypt/issues/35","labels_url":"https://api.github.com/repos/travist/jsencrypt/issues/35/labels{/name}","comments_url":"https://api.github.com/repos/travist/jsencrypt/issues/35/comments","events_url":"https://api.github.com/repos/travist/jsencrypt/issues/35/events","html_url":"https://github.com/travist/jsencrypt/issues/35","id":49093803,"number":35,"title":"Support for password protected private keys?","user":{"login":"markharding","id":851436,"avatar_url":"https://avatars.githubusercontent.com/u/851436?v=3","gravatar_id":"","url":"https://api.github.com/users/markharding","html_url":"https://github.com/markharding","followers_url":"https://api.github.com/users/markharding/followers","following_url":"https://api.github.com/users/markharding/following{/other_user}","gists_url":"https://api.github.com/users/markharding/gists{/gist_id}","starred_url":"https://api.github.com/users/markharding/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/markharding/subscriptions","organizations_url":"https://api.github.com/users/markharding/orgs","repos_url":"https://api.github.com/users/markharding/repos","events_url":"https://api.github.com/users/markharding/events{/privacy}","received_events_url":"https://api.github.com/users/markharding/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2014-11-17T14:12:33Z","updated_at":"2015-06-25T14:36:01Z","closed_at":null,"body":"Is there planned support for password protected private keys? Does anyone have a quick hack for this?\r\n\r\nCheers"},"comment":{"url":"https://api.github.com/repos/travist/jsencrypt/issues/comments/115277985","html_url":"https://github.com/travist/jsencrypt/issues/35#issuecomment-115277985","issue_url":"https://api.github.com/repos/travist/jsencrypt/issues/35","id":115277985,"user":{"login":"DougYS","id":12259975,"avatar_url":"https://avatars.githubusercontent.com/u/12259975?v=3","gravatar_id":"","url":"https://api.github.com/users/DougYS","html_url":"https://github.com/DougYS","followers_url":"https://api.github.com/users/DougYS/followers","following_url":"https://api.github.com/users/DougYS/following{/other_user}","gists_url":"https://api.github.com/users/DougYS/gists{/gist_id}","starred_url":"https://api.github.com/users/DougYS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DougYS/subscriptions","organizations_url":"https://api.github.com/users/DougYS/orgs","repos_url":"https://api.github.com/users/DougYS/repos","events_url":"https://api.github.com/users/DougYS/events{/privacy}","received_events_url":"https://api.github.com/users/DougYS/received_events","type":"User","site_admin":false},"created_at":"2015-06-25T14:36:01Z","updated_at":"2015-06-25T14:36:01Z","body":"I worked around it using some other encryption libraries: https://kjur.github.io/jsrsasign/\r\n\r\n```\r\n    // Decrypt private key using passphrase\r\n    decPKHex = PKCS5PKEY.getDecryptedKeyHex(encPK, passphrase);\r\n    // Convert to PEM format for JSEncrypt\r\n    decPKPEM = KJUR.asn1.ASN1Util.getPEMStringFromHex(decPKHex, \"RSA PRIVATE KEY\");\r\n\r\n    // Decrypt the tokenized data\r\n    var crypt = new JSEncrypt();\r\n    crypt.setPrivateKey(decPKPEM);\r\n```"}}