- Add the Codota plugin to your IDE and get smart completions
private void myMethod () {}
public static void main(String[] args) throws Exception { String key = genKey(); System.out.println("Key is: " + key); String message = "long message to be encrypted"; System.out.println("Value clean: " + message); String res = KeyHelper.encryptNew(message, key); System.out.println("Value encrypted: " + res); message = KeyHelper.decryptNew(res, key); System.out.println("Value cleat: " + message); } }
KeyHelper.encryptNew( "{\"name\":\"" + serviceName + "\",\"action\":\"register\"}", serviceKey);
service.setToken(KeyHelper.encryptNew(token.getValue(), service.getKeyValue())); service.setTokenExpirationDate(token.getExpiration().getTime()); serviceRepository.save(service);