{"action":"created","issue":{"url":"https://api.github.com/repos/defuse/php-encryption/issues/79","labels_url":"https://api.github.com/repos/defuse/php-encryption/issues/79/labels{/name}","comments_url":"https://api.github.com/repos/defuse/php-encryption/issues/79/comments","events_url":"https://api.github.com/repos/defuse/php-encryption/issues/79/events","html_url":"https://github.com/defuse/php-encryption/issues/79","id":96603747,"number":79,"title":"Use of statics prohibits testing/injection/mocking capabilities","user":{"login":"Rican7","id":742384,"avatar_url":"https://avatars.githubusercontent.com/u/742384?v=3","gravatar_id":"","url":"https://api.github.com/users/Rican7","html_url":"https://github.com/Rican7","followers_url":"https://api.github.com/users/Rican7/followers","following_url":"https://api.github.com/users/Rican7/following{/other_user}","gists_url":"https://api.github.com/users/Rican7/gists{/gist_id}","starred_url":"https://api.github.com/users/Rican7/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Rican7/subscriptions","organizations_url":"https://api.github.com/users/Rican7/orgs","repos_url":"https://api.github.com/users/Rican7/repos","events_url":"https://api.github.com/users/Rican7/events{/privacy}","received_events_url":"https://api.github.com/users/Rican7/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":17,"created_at":"2015-07-22T16:04:27Z","updated_at":"2015-07-23T01:00:39Z","closed_at":null,"body":"This library uses all static methods, and while some of them make sense, its really too bad that the library's Crypto class can't be used as an injectable instance. Currently, testing services that make use of this library means running expensive crypto hashing algorithms that slow down a unit testing feedback loop.\r\n\r\nSwitching to non-statics would also allow for certain configurations to be used, if certain aspects needed to be overrided (I know, likely not suggested), for example providing a different hash function but defaulting to the current constant `sha256`.\r\n\r\nThank you for this great library and for considering this issue."},"comment":{"url":"https://api.github.com/repos/defuse/php-encryption/issues/comments/123919924","html_url":"https://github.com/defuse/php-encryption/issues/79#issuecomment-123919924","issue_url":"https://api.github.com/repos/defuse/php-encryption/issues/79","id":123919924,"user":{"login":"paragonie-scott","id":11591518,"avatar_url":"https://avatars.githubusercontent.com/u/11591518?v=3","gravatar_id":"","url":"https://api.github.com/users/paragonie-scott","html_url":"https://github.com/paragonie-scott","followers_url":"https://api.github.com/users/paragonie-scott/followers","following_url":"https://api.github.com/users/paragonie-scott/following{/other_user}","gists_url":"https://api.github.com/users/paragonie-scott/gists{/gist_id}","starred_url":"https://api.github.com/users/paragonie-scott/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paragonie-scott/subscriptions","organizations_url":"https://api.github.com/users/paragonie-scott/orgs","repos_url":"https://api.github.com/users/paragonie-scott/repos","events_url":"https://api.github.com/users/paragonie-scott/events{/privacy}","received_events_url":"https://api.github.com/users/paragonie-scott/received_events","type":"User","site_admin":false},"created_at":"2015-07-23T01:00:39Z","updated_at":"2015-07-23T01:00:39Z","body":"Upon reflection, nope. :)\r\n\r\nI'll draft a PR real quick."}}