{"action":"created","comment":{"url":"https://api.github.com/repos/Talend/data-quality/pulls/comments/235393576","pull_request_review_id":177246948,"id":235393576,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzNTM5MzU3Ng==","diff_hunk":"@@ -0,0 +1,96 @@\n+// ============================================================================\n+//\n+// Copyright (C) 2006-2016 Talend Inc. - www.talend.com\n+//\n+// This source code is available under agreement available at\n+// %InstallDIR%\\features\\org.talend.rcp.branding.%PRODUCTNAME%\\%PRODUCTNAME%license.txt\n+//\n+// You should have received a copy of the agreement\n+// along with this program; if not, write to Talend SA\n+// 9 rue Pages 92150 Suresnes, France\n+//\n+// ============================================================================\n+package org.talend.dataquality.datamasking.utils.crypto;\n+\n+import org.slf4j.Logger;\n+import org.slf4j.LoggerFactory;\n+\n+/**\n+ *\n+ * This class contains constant values about FPE encryption.\n+ *\n+ * @author afournier\n+ * @see AesPrf\n+ * @see HmacPrf\n+ * @see org.talend.dataquality.datamasking.SecretManager\n+ */\n+public class CryptoConstants {\n+\n+    private static final Logger LOGGER = LoggerFactory.getLogger(CryptoConstants.class);\n+\n+    /**\n+     * Algorithm for AES encryption.\n+     * CBC stands for Chaining block cipher : Each block is encrypted using the previous one.\n+     * There is no padding because this part is done in FF1 algorithm, after the call of this algorithm.\n+     */\n+    public static final String AES_ALGORITHM = \"AES/CBC/NoPadding\";\n+\n+    /**\n+     * Algorithm used by the Hmac PRF, which uses SHA-2 hash function.\n+     */\n+    public static final String HMAC_ALGORITHM = \"HmacSHA256\";\n+\n+    /**\n+     * This algorithm is a key stretching method used to derivate a password into a stronger cipher key.\n+     * This algorithm is used to generate keys for both AES adn HMAC Prfs.\n+     */\n+    public static final String KEY_ALGORITHM = \"PBKDF2WithHmacSHA256\";\n+\n+    /**\n+     * AES key algorithm name used only to generate the secret specifications for the AES Cipher.\n+     * This is not used to generate a key.\n+     */\n+    public static final String AES_KEY_ALGORITHM = \"AES\";\n+\n+    /**\n+     * Length in bytes of the key used for FPE.\n+     */\n+    public static final int KEY_LENGTH = getKeyLength();","path":"dataquality-sampling/src/main/java/org/talend/dataquality/datamasking/utils/crypto/CryptoConstants.java","position":58,"original_position":58,"commit_id":"10630785241658c34d81fb73d18bc023fd613254","original_commit_id":"10630785241658c34d81fb73d18bc023fd613254","user":{"login":"ArnaudFnr","id":12599044,"node_id":"MDQ6VXNlcjEyNTk5MDQ0","avatar_url":"https://avatars0.githubusercontent.com/u/12599044?v=4","gravatar_id":"","url":"https://api.github.com/users/ArnaudFnr","html_url":"https://github.com/ArnaudFnr","followers_url":"https://api.github.com/users/ArnaudFnr/followers","following_url":"https://api.github.com/users/ArnaudFnr/following{/other_user}","gists_url":"https://api.github.com/users/ArnaudFnr/gists{/gist_id}","starred_url":"https://api.github.com/users/ArnaudFnr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ArnaudFnr/subscriptions","organizations_url":"https://api.github.com/users/ArnaudFnr/orgs","repos_url":"https://api.github.com/users/ArnaudFnr/repos","events_url":"https://api.github.com/users/ArnaudFnr/events{/privacy}","received_events_url":"https://api.github.com/users/ArnaudFnr/received_events","type":"User","site_admin":false},"body":"You're right , I changed it","created_at":"2018-11-21T13:50:26Z","updated_at":"2018-11-21T13:50:26Z","html_url":"https://github.com/Talend/data-quality/pull/499#discussion_r235393576","pull_request_url":"https://api.github.com/repos/Talend/data-quality/pulls/499","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/Talend/data-quality/pulls/comments/235393576"},"html":{"href":"https://github.com/Talend/data-quality/pull/499#discussion_r235393576"},"pull_request":{"href":"https://api.github.com/repos/Talend/data-quality/pulls/499"}},"in_reply_to_id":235315889},"pull_request":{"url":"https://api.github.com/repos/Talend/data-quality/pulls/499","id":229747662,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI5NzQ3NjYy","html_url":"https://github.com/Talend/data-quality/pull/499","diff_url":"https://github.com/Talend/data-quality/pull/499.diff","patch_url":"https://github.com/Talend/data-quality/pull/499.patch","issue_url":"https://api.github.com/repos/Talend/data-quality/issues/499","number":499,"state":"open","locked":false,"title":"feat(TDQ-16099) Add format-preserving encryption for Datamasking","user":{"login":"ArnaudFnr","id":12599044,"node_id":"MDQ6VXNlcjEyNTk5MDQ0","avatar_url":"https://avatars0.githubusercontent.com/u/12599044?v=4","gravatar_id":"","url":"https://api.github.com/users/ArnaudFnr","html_url":"https://github.com/ArnaudFnr","followers_url":"https://api.github.com/users/ArnaudFnr/followers","following_url":"https://api.github.com/users/ArnaudFnr/following{/other_user}","gists_url":"https://api.github.com/users/ArnaudFnr/gists{/gist_id}","starred_url":"https://api.github.com/users/ArnaudFnr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ArnaudFnr/subscriptions","organizations_url":"https://api.github.com/users/ArnaudFnr/orgs","repos_url":"https://api.github.com/users/ArnaudFnr/repos","events_url":"https://api.github.com/users/ArnaudFnr/events{/privacy}","received_events_url":"https://api.github.com/users/ArnaudFnr/received_events","type":"User","site_admin":false},"body":"FF1 Format-Preserving encryption support has been added in the data masking module.\r\nFF1 can be used with : \r\n- GenerateUniqueSsnFr\r\n- GenerateUniqueSsnGermany\r\n- GenerateUniqueSsnIndia\r\n- GenerateUniqueSsnChn\r\n- GenerateUniqueSsnJapan\r\n- GenerateUniqueSsnUk\r\n- GenerateUniqueSsnUs\r\n\r\nIn addition, a `SecretManager` class has been added to handle keys and secrets for masking.","created_at":"2018-11-09T16:27:33Z","updated_at":"2018-11-21T13:50:26Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3200b6d28e283b85ac59075146a81467c09a823d","assignee":null,"assignees":[],"requested_reviewers":[{"login":"talend-dprot","id":18736961,"node_id":"MDQ6VXNlcjE4NzM2OTYx","avatar_url":"https://avatars3.githubusercontent.com/u/18736961?v=4","gravatar_id":"","url":"https://api.github.com/users/talend-dprot","html_url":"https://github.com/talend-dprot","followers_url":"https://api.github.com/users/talend-dprot/followers","following_url":"https://api.github.com/users/talend-dprot/following{/other_user}","gists_url":"https://api.github.com/users/talend-dprot/gists{/gist_id}","starred_url":"https://api.github.com/users/talend-dprot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/talend-dprot/subscriptions","organizations_url":"https://api.github.com/users/talend-dprot/orgs","repos_url":"https://api.github.com/users/talend-dprot/repos","events_url":"https://api.github.com/users/talend-dprot/events{/privacy}","received_events_url":"https://api.github.com/users/talend-dprot/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/Talend/data-quality/pulls/499/commits","review_comments_url":"https://api.github.com/repos/Talend/data-quality/pulls/499/comments","review_comment_url":"https://api.github.com/repos/Talend/data-quality/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Talend/data-quality/issues/499/comments","statuses_url":"https://api.github.com/repos/Talend/data-quality/statuses/10630785241658c34d81fb73d18bc023fd613254","head":{"label":"Talend:afournier/fpe_masking","ref":"afournier/fpe_masking","sha":"10630785241658c34d81fb73d18bc023fd613254","user":{"login":"Talend","id":459687,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ1OTY4Nw==","avatar_url":"https://avatars2.githubusercontent.com/u/459687?v=4","gravatar_id":"","url":"https://api.github.com/users/Talend","html_url":"https://github.com/Talend","followers_url":"https://api.github.com/users/Talend/followers","following_url":"https://api.github.com/users/Talend/following{/other_user}","gists_url":"https://api.github.com/users/Talend/gists{/gist_id}","starred_url":"https://api.github.com/users/Talend/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Talend/subscriptions","organizations_url":"https://api.github.com/users/Talend/orgs","repos_url":"https://api.github.com/users/Talend/repos","events_url":"https://api.github.com/users/Talend/events{/privacy}","received_events_url":"https://api.github.com/users/Talend/received_events","type":"Organization","site_admin":false},"repo":{"id":48360594,"node_id":"MDEwOlJlcG9zaXRvcnk0ODM2MDU5NA==","name":"data-quality","full_name":"Talend/data-quality","private":false,"owner":{"login":"Talend","id":459687,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ1OTY4Nw==","avatar_url":"https://avatars2.githubusercontent.com/u/459687?v=4","gravatar_id":"","url":"https://api.github.com/users/Talend","html_url":"https://github.com/Talend","followers_url":"https://api.github.com/users/Talend/followers","following_url":"https://api.github.com/users/Talend/following{/other_user}","gists_url":"https://api.github.com/users/Talend/gists{/gist_id}","starred_url":"https://api.github.com/users/Talend/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Talend/subscriptions","organizations_url":"https://api.github.com/users/Talend/orgs","repos_url":"https://api.github.com/users/Talend/repos","events_url":"https://api.github.com/users/Talend/events{/privacy}","received_events_url":"https://api.github.com/users/Talend/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/Talend/data-quality","description":null,"fork":false,"url":"https://api.github.com/repos/Talend/data-quality","forks_url":"https://api.github.com/repos/Talend/data-quality/forks","keys_url":"https://api.github.com/repos/Talend/data-quality/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Talend/data-quality/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Talend/data-quality/teams","hooks_url":"https://api.github.com/repos/Talend/data-quality/hooks","issue_events_url":"https://api.github.com/repos/Talend/data-quality/issues/events{/number}","events_url":"https://api.github.com/repos/Talend/data-quality/events","assignees_url":"https://api.github.com/repos/Talend/data-quality/assignees{/user}","branches_url":"https://api.github.com/repos/Talend/data-quality/branches{/branch}","tags_url":"https://api.github.com/repos/Talend/data-quality/tags","blobs_url":"https://api.github.com/repos/Talend/data-quality/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Talend/data-quality/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Talend/data-quality/git/refs{/sha}","trees_url":"https://api.github.com/repos/Talend/data-quality/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Talend/data-quality/statuses/{sha}","languages_url":"https://api.github.com/repos/Talend/data-quality/languages","stargazers_url":"https://api.github.com/repos/Talend/data-quality/stargazers","contributors_url":"https://api.github.com/repos/Talend/data-quality/contributors","subscribers_url":"https://api.github.com/repos/Talend/data-quality/subscribers","subscription_url":"https://api.github.com/repos/Talend/data-quality/subscription","commits_url":"https://api.github.com/repos/Talend/data-quality/commits{/sha}","git_commits_url":"https://api.github.com/repos/Talend/data-quality/git/commits{/sha}","comments_url":"https://api.github.com/repos/Talend/data-quality/comments{/number}","issue_comment_url":"https://api.github.com/repos/Talend/data-quality/issues/comments{/number}","contents_url":"https://api.github.com/repos/Talend/data-quality/contents/{+path}","compare_url":"https://api.github.com/repos/Talend/data-quality/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Talend/data-quality/merges","archive_url":"https://api.github.com/repos/Talend/data-quality/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Talend/data-quality/downloads","issues_url":"https://api.github.com/repos/Talend/data-quality/issues{/number}","pulls_url":"https://api.github.com/repos/Talend/data-quality/pulls{/number}","milestones_url":"https://api.github.com/repos/Talend/data-quality/milestones{/number}","notifications_url":"https://api.github.com/repos/Talend/data-quality/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Talend/data-quality/labels{/name}","releases_url":"https://api.github.com/repos/Talend/data-quality/releases{/id}","deployments_url":"https://api.github.com/repos/Talend/data-quality/deployments","created_at":"2015-12-21T08:41:06Z","updated_at":"2018-11-20T13:08:02Z","pushed_at":"2018-11-21T08:58:49Z","git_url":"git://github.com/Talend/data-quality.git","ssh_url":"git@github.com:Talend/data-quality.git","clone_url":"https://github.com/Talend/data-quality.git","svn_url":"https://github.com/Talend/data-quality","homepage":null,"size":130122,"stargazers_count":20,"watchers_count":20,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":15,"mirror_url":null,"archived":false,"open_issues_count":3,"license":null,"forks":15,"open_issues":3,"watchers":20,"default_branch":"master"}},"base":{"label":"Talend:master","ref":"master","sha":"1923ecb247de7077600b306b1a82f0a3012307bb","user":{"login":"Talend","id":459687,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ1OTY4Nw==","avatar_url":"https://avatars2.githubusercontent.com/u/459687?v=4","gravatar_id":"","url":"https://api.github.com/users/Talend","html_url":"https://github.com/Talend","followers_url":"https://api.github.com/users/Talend/followers","following_url":"https://api.github.com/users/Talend/following{/other_user}","gists_url":"https://api.github.com/users/Talend/gists{/gist_id}","starred_url":"https://api.github.com/users/Talend/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Talend/subscriptions","organizations_url":"https://api.github.com/users/Talend/orgs","repos_url":"https://api.github.com/users/Talend/repos","events_url":"https://api.github.com/users/Talend/events{/privacy}","received_events_url":"https://api.github.com/users/Talend/received_events","type":"Organization","site_admin":false},"repo":{"id":48360594,"node_id":"MDEwOlJlcG9zaXRvcnk0ODM2MDU5NA==","name":"data-quality","full_name":"Talend/data-quality","private":false,"owner":{"login":"Talend","id":459687,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ1OTY4Nw==","avatar_url":"https://avatars2.githubusercontent.com/u/459687?v=4","gravatar_id":"","url":"https://api.github.com/users/Talend","html_url":"https://github.com/Talend","followers_url":"https://api.github.com/users/Talend/followers","following_url":"https://api.github.com/users/Talend/following{/other_user}","gists_url":"https://api.github.com/users/Talend/gists{/gist_id}","starred_url":"https://api.github.com/users/Talend/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Talend/subscriptions","organizations_url":"https://api.github.com/users/Talend/orgs","repos_url":"https://api.github.com/users/Talend/repos","events_url":"https://api.github.com/users/Talend/events{/privacy}","received_events_url":"https://api.github.com/users/Talend/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/Talend/data-quality","description":null,"fork":false,"url":"https://api.github.com/repos/Talend/data-quality","forks_url":"https://api.github.com/repos/Talend/data-quality/forks","keys_url":"https://api.github.com/repos/Talend/data-quality/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Talend/data-quality/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Talend/data-quality/teams","hooks_url":"https://api.github.com/repos/Talend/data-quality/hooks","issue_events_url":"https://api.github.com/repos/Talend/data-quality/issues/events{/number}","events_url":"https://api.github.com/repos/Talend/data-quality/events","assignees_url":"https://api.github.com/repos/Talend/data-quality/assignees{/user}","branches_url":"https://api.github.com/repos/Talend/data-quality/branches{/branch}","tags_url":"https://api.github.com/repos/Talend/data-quality/tags","blobs_url":"https://api.github.com/repos/Talend/data-quality/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Talend/data-quality/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Talend/data-quality/git/refs{/sha}","trees_url":"https://api.github.com/repos/Talend/data-quality/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Talend/data-quality/statuses/{sha}","languages_url":"https://api.github.com/repos/Talend/data-quality/languages","stargazers_url":"https://api.github.com/repos/Talend/data-quality/stargazers","contributors_url":"https://api.github.com/repos/Talend/data-quality/contributors","subscribers_url":"https://api.github.com/repos/Talend/data-quality/subscribers","subscription_url":"https://api.github.com/repos/Talend/data-quality/subscription","commits_url":"https://api.github.com/repos/Talend/data-quality/commits{/sha}","git_commits_url":"https://api.github.com/repos/Talend/data-quality/git/commits{/sha}","comments_url":"https://api.github.com/repos/Talend/data-quality/comments{/number}","issue_comment_url":"https://api.github.com/repos/Talend/data-quality/issues/comments{/number}","contents_url":"https://api.github.com/repos/Talend/data-quality/contents/{+path}","compare_url":"https://api.github.com/repos/Talend/data-quality/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Talend/data-quality/merges","archive_url":"https://api.github.com/repos/Talend/data-quality/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Talend/data-quality/downloads","issues_url":"https://api.github.com/repos/Talend/data-quality/issues{/number}","pulls_url":"https://api.github.com/repos/Talend/data-quality/pulls{/number}","milestones_url":"https://api.github.com/repos/Talend/data-quality/milestones{/number}","notifications_url":"https://api.github.com/repos/Talend/data-quality/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Talend/data-quality/labels{/name}","releases_url":"https://api.github.com/repos/Talend/data-quality/releases{/id}","deployments_url":"https://api.github.com/repos/Talend/data-quality/deployments","created_at":"2015-12-21T08:41:06Z","updated_at":"2018-11-20T13:08:02Z","pushed_at":"2018-11-21T08:58:49Z","git_url":"git://github.com/Talend/data-quality.git","ssh_url":"git@github.com:Talend/data-quality.git","clone_url":"https://github.com/Talend/data-quality.git","svn_url":"https://github.com/Talend/data-quality","homepage":null,"size":130122,"stargazers_count":20,"watchers_count":20,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":15,"mirror_url":null,"archived":false,"open_issues_count":3,"license":null,"forks":15,"open_issues":3,"watchers":20,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Talend/data-quality/pulls/499"},"html":{"href":"https://github.com/Talend/data-quality/pull/499"},"issue":{"href":"https://api.github.com/repos/Talend/data-quality/issues/499"},"comments":{"href":"https://api.github.com/repos/Talend/data-quality/issues/499/comments"},"review_comments":{"href":"https://api.github.com/repos/Talend/data-quality/pulls/499/comments"},"review_comment":{"href":"https://api.github.com/repos/Talend/data-quality/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Talend/data-quality/pulls/499/commits"},"statuses":{"href":"https://api.github.com/repos/Talend/data-quality/statuses/10630785241658c34d81fb73d18bc023fd613254"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"ArnaudFnr"}}