<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
Hy guys,
<div class=""><br class="">
</div>
<div class="">I am trying to use some crypto to match hashes from my old db.</div>
<div class="">The code is :</div>
<div class=""><br class="">
</div>
<div class="">
<div class=""> KeySpec keySpec = new PBEKeySpec(password.toCharArray(), salt.getBytes(), 2048, 160);</div>
<div class=""> SecretKeyFactory secretKeyFactory = SecretKeyFactory.getInstance("PBKDF2WithHmacSHA1");</div>
<div class=""> byte[] hash = secretKeyFactory.generateSecret(keySpec).getEncoded();</div>
<div class=""><br class="">
</div>
<div class="">I cant make it work as a federation provider.</div>
<div class=""><br class="">
</div>
<div class="">it was complaining about java.lang.ClassNotFoundException: javax.crypto.spec.PBEKeySpec</div>
<div class=""><br class="">
</div>
<div class="">I added jce.jar to the list of dependencies in my module.xml (I shouldn’t have to do that)</div>
<div class=""><br class="">
</div>
<div class="">Then I got :</div>
<div class=""><br class="">
</div>
<div class="">ClassNotFoundException: sun.security.jca.GetInstance</div>
<div class=""><br class="">
</div>
<div class="">I added rt.jar (which I shouldn’t do either)</div>
<div class=""><br class="">
</div>
<div class="">and then I got some fancy exception : java.lang.LinkageError: loader constraint violation</div>
<div class=""><br class="">
</div>
<div class="">I then tried with bouncy castle : bcprov-jdk15on-152.jar to no avail.</div>
<div class=""><br class="">
</div>
<div class="">what is wrong ?</div>
<div class=""><br class="">
</div>
<div class="">here is my module.xml file :</div>
<div class=""><br class="">
</div>
<div class="">
<div style="margin: 0px; font-size: 13px; font-family: Menlo; color: rgb(52, 189, 38);" class="">
<span style="font-variant-ligatures: no-common-ligatures; color: #5330e1" class=""><?</span>xml version<span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">=</span><span style="font-variant-ligatures: no-common-ligatures; color: #c33720" class="">"1.0"</span>
encoding<span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">=</span><span style="font-variant-ligatures: no-common-ligatures; color: #c33720" class="">"UTF-8"</span><span style="font-variant-ligatures: no-common-ligatures; color: #5330e1" class="">?></span></div>
<div style="margin: 0px; font-size: 13px; font-family: Menlo; color: rgb(195, 55, 32);" class="">
<span style="font-variant-ligatures: no-common-ligatures; color: #34bbc7" class=""><module
</span><span style="font-variant-ligatures: no-common-ligatures; color: #34bd26" class="">xmlns</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">=</span>"urn:jboss:module:1.1"<span style="font-variant-ligatures: no-common-ligatures; color: #34bbc7" class="">
</span><span style="font-variant-ligatures: no-common-ligatures; color: #34bd26" class="">name</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">=</span>"com.imetrik.saas.server.services.insuranceWebUIBackend.dao.federation"<span style="font-variant-ligatures: no-common-ligatures; color: #34bbc7" class="">></span></div>
<div style="margin: 0px; font-size: 13px; font-family: Menlo; color: rgb(52, 187, 199);" class="">
<span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">
</span><resources></div>
<div style="margin: 0px; font-size: 13px; font-family: Menlo; color: rgb(195, 55, 32);" class="">
<span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">
</span><span style="font-variant-ligatures: no-common-ligatures; color: #34bbc7" class=""><resource-root
</span><span style="font-variant-ligatures: no-common-ligatures; color: #34bd26" class="">path</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">=</span>"insuranceWebUIBackend-lib-2.0.5-SNAPSHOT.jar"<span style="font-variant-ligatures: no-common-ligatures; color: #34bbc7" class="">/></span></div>
<div style="margin: 0px; font-size: 13px; font-family: Menlo; color: rgb(195, 55, 32);" class="">
<span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">
</span><span style="font-variant-ligatures: no-common-ligatures; color: #34bbc7" class=""><resource-root
</span><span style="font-variant-ligatures: no-common-ligatures; color: #34bd26" class="">path</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">=</span>"jdbi-2.63.1.jar"<span style="font-variant-ligatures: no-common-ligatures; color: #34bbc7" class="">/></span></div>
<div style="margin: 0px; font-size: 13px; font-family: Menlo; color: rgb(195, 55, 32);" class="">
<span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">
</span><span style="font-variant-ligatures: no-common-ligatures; color: #34bbc7" class=""><resource-root
</span><span style="font-variant-ligatures: no-common-ligatures; color: #34bd26" class="">path</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">=</span>"postgresql-9.4-1203-jdbc4.jar"<span style="font-variant-ligatures: no-common-ligatures; color: #34bbc7" class="">/></span></div>
<div style="margin: 0px; font-size: 13px; font-family: Menlo; color: rgb(195, 55, 32);" class="">
<span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">
</span><span style="font-variant-ligatures: no-common-ligatures; color: #34bbc7" class=""><resource-root
</span><span style="font-variant-ligatures: no-common-ligatures; color: #34bd26" class="">path</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">=</span>"slf4j-api-1.7.12.jar"<span style="font-variant-ligatures: no-common-ligatures; color: #34bbc7" class="">/></span></div>
<div style="margin: 0px; font-size: 13px; font-family: Menlo; color: rgb(195, 55, 32);" class="">
<span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">
</span><span style="font-variant-ligatures: no-common-ligatures; color: #34bbc7" class=""><resource-root
</span><span style="font-variant-ligatures: no-common-ligatures; color: #34bd26" class="">path</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">=</span>"slf4j-simple-1.7.12.jar"<span style="font-variant-ligatures: no-common-ligatures; color: #34bbc7" class="">/></span></div>
<div style="margin: 0px; font-size: 13px; font-family: Menlo; color: rgb(195, 55, 32);" class="">
<span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">
</span><span style="font-variant-ligatures: no-common-ligatures; color: #34bbc7" class=""><resource-root
</span><span style="font-variant-ligatures: no-common-ligatures; color: #34bd26" class="">path</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">=</span>"global-library-common-2.0.4.jar"<span style="font-variant-ligatures: no-common-ligatures; color: #34bbc7" class="">/></span></div>
<div style="margin: 0px; font-size: 13px; font-family: Menlo; color: rgb(52, 187, 199);" class="">
<span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">
</span><resource-root <span style="font-variant-ligatures: no-common-ligatures; color: #34bd26" class="">
path</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">=</span><span style="font-variant-ligatures: no-common-ligatures; color: #c33720" class="">"jce.jar"</span>/></div>
<div style="margin: 0px; font-size: 13px; font-family: Menlo; color: rgb(195, 55, 32);" class="">
<span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">
</span><span style="font-variant-ligatures: no-common-ligatures; color: #34bbc7" class=""><resource-root
</span><span style="font-variant-ligatures: no-common-ligatures; color: #34bd26" class="">path</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">=</span>"bcprov-jdk15on-152.jar"<span style="font-variant-ligatures: no-common-ligatures; color: #34bbc7" class="">/></span></div>
<div style="margin: 0px; font-size: 13px; font-family: Menlo; color: rgb(52, 187, 199);" class="">
<span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">
</span></resources></div>
<div style="margin: 0px; font-size: 13px; font-family: Menlo; color: rgb(52, 187, 199);" class="">
<span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">
</span><dependencies></div>
<div style="margin: 0px; font-size: 13px; font-family: Menlo; color: rgb(195, 55, 32);" class="">
<span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">
</span><span style="font-variant-ligatures: no-common-ligatures; color: #34bbc7" class=""><module
</span><span style="font-variant-ligatures: no-common-ligatures; color: #34bd26" class="">name</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">=</span>"org.keycloak.keycloak-core"<span style="font-variant-ligatures: no-common-ligatures; color: #34bbc7" class="">/></span></div>
<div style="margin: 0px; font-size: 13px; font-family: Menlo; color: rgb(195, 55, 32);" class="">
<span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">
</span><span style="font-variant-ligatures: no-common-ligatures; color: #34bbc7" class=""><module
</span><span style="font-variant-ligatures: no-common-ligatures; color: #34bd26" class="">name</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">=</span>"org.keycloak.keycloak-model-api"<span style="font-variant-ligatures: no-common-ligatures; color: #34bbc7" class="">/></span></div>
<div style="margin: 0px; font-size: 13px; font-family: Menlo; color: rgb(52, 187, 199);" class="">
<span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">
</span></dependencies></div>
<div style="margin: 0px; font-size: 13px; font-family: Menlo; color: rgb(52, 187, 199);" class="">
</module></div>
</div>
<div class=""><br class="">
</div>
<div class=""><br class="">
</div>
<div class="">Cheers.</div>
<div class=""><br class="Apple-interchange-newline">
<hr align="left" border-color:#40ae49;="" style="font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; color: rgb(102, 102, 102); font-family: Helvetica, Arial, sans-serif; line-height: 14px; border: 0px; width: 320px; height: 1px; background-color: rgb(64, 174, 73);" class="">
<p class="MsoNormal" style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; orphans: 2; widows: 2; margin: 0cm 0cm 1pt;">
<br style="color: rgb(102, 102, 102); font-family: Helvetica, Arial, sans-serif; font-size: 12px; line-height: 14px; orphans: auto; widows: auto;" class="">
<span style="color: rgb(102, 102, 102); font-family: Helvetica, Arial, sans-serif; font-size: 12px; line-height: 14px; orphans: auto; widows: auto; text-transform: uppercase;" class="">REMI CARTIER</span><br style="color: rgb(102, 102, 102); font-family: Helvetica, Arial, sans-serif; font-size: 12px; line-height: 14px; orphans: auto; widows: auto;" class="">
</p>
<div style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">
<span style="text-align: -webkit-auto; line-height: 14px;" class=""><font color="#666666" face="Helvetica, Arial, sans-serif" class="">B.O.S.S. (Business & Operation Support Systems) P.O (Product Owner)</font></span></div>
<br style="font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; color: rgb(102, 102, 102); font-family: Helvetica, Arial, sans-serif; line-height: 14px;" class="">
<strong style="font-size: 12px; font-style: normal; font-variant: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; color: rgb(64, 174, 73); font-family: Helvetica, Arial, sans-serif; line-height: 14px; text-transform: uppercase;" class="">IMETRIK
GLOBAL INC.</strong><span style="font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; color: rgb(102, 102, 102); font-family: Helvetica, Arial, sans-serif; line-height: 14px;" class=""> </span><br style="font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; color: rgb(102, 102, 102); font-family: Helvetica, Arial, sans-serif; line-height: 14px;" class="">
<strong style="font-size: 12px; font-style: normal; font-variant: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; color: rgb(102, 102, 102); font-family: Helvetica, Arial, sans-serif; line-height: 14px;" class="">T
:</strong><span style="font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; color: rgb(102, 102, 102); font-family: Helvetica, Arial, sans-serif; line-height: 14px;" class=""> +1
514 448-6407 x2009</span><br style="font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; color: rgb(102, 102, 102); font-family: Helvetica, Arial, sans-serif; line-height: 14px;" class="">
<strong style="font-size: 12px; font-style: normal; font-variant: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; color: rgb(102, 102, 102); font-family: Helvetica, Arial, sans-serif; line-height: 14px;" class="">T
:</strong><span style="font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; color: rgb(102, 102, 102); font-family: Helvetica, Arial, sans-serif; line-height: 14px;" class=""> +1
866 276-5382 (toll free) </span><br style="font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; color: rgb(102, 102, 102); font-family: Helvetica, Arial, sans-serif; line-height: 14px;" class="">
<strong style="font-size: 12px; font-style: normal; font-variant: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; color: rgb(102, 102, 102); font-family: Helvetica, Arial, sans-serif; line-height: 14px;" class="">F
:</strong><span style="font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; color: rgb(102, 102, 102); font-family: Helvetica, Arial, sans-serif; line-height: 14px;" class=""> +1
514 904-0611 </span><br style="font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; color: rgb(102, 102, 102); font-family: Helvetica, Arial, sans-serif; line-height: 14px;" class="">
<br style="font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; color: rgb(102, 102, 102); font-family: Helvetica, Arial, sans-serif; line-height: 14px;" class="">
<span style="font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; color: rgb(102, 102, 102); font-family: Helvetica, Arial, sans-serif; line-height: 14px;" class="">740
Notre Dame St. West, Suite 1575 </span><br style="font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; color: rgb(102, 102, 102); font-family: Helvetica, Arial, sans-serif; line-height: 14px;" class="">
<span style="font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; color: rgb(102, 102, 102); font-family: Helvetica, Arial, sans-serif; line-height: 14px;" class="">Montreal,
Quebec, Canada H3C 3X6 </span><br style="font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; color: rgb(102, 102, 102); font-family: Helvetica, Arial, sans-serif; line-height: 14px;" class="">
<a href="http://www.imetrik.com/" target="_blank" style="font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; color: rgb(64, 174, 73); font-family: Helvetica, Arial, sans-serif; line-height: 14px;" class="">imetrik.com</a>
</div>
<br class="">
</div>
</body>
</html>