use of org.orcid.core.manager.EncryptionManager in project ORCID-Source by ORCID.
the class CheckHashMatches method main.
@SuppressWarnings("resource")
public static void main(String[] args) {
ApplicationContext context = new ClassPathXmlApplicationContext("orcid-core-context.xml");
EncryptionManager encyrptionManager = (EncryptionManager) context.getBean("encryptionManager");
long startTime = System.currentTimeMillis();
boolean matched = encyrptionManager.hashMatches(args[0], args[1]);
long duration = System.currentTimeMillis() - startTime;
System.out.println("Took: " + duration);
System.out.println("Matched: " + matched);
}
use of org.orcid.core.manager.EncryptionManager in project ORCID-Source by ORCID.
the class EncryptForExternalUse method main.
@SuppressWarnings("resource")
public static void main(String[] args) {
try {
ApplicationContext context = new ClassPathXmlApplicationContext("orcid-core-context.xml");
EncryptionManager encyrptionManager = (EncryptionManager) context.getBean("encryptionManager");
System.out.println(encyrptionManager.encryptForExternalUse(args[0]));
} catch (Throwable t) {
System.out.println(t);
} finally {
System.exit(0);
}
}
Aggregations