@Override public String encryptParameterMessage(String message) { return Crypt.encrypt(StringUtils.rightPad(configService.getTeamCalCryptPassword(), 32, "x"), message); }
/** * Encrypts the given str with AES. The key is the current authenticationToken of the given user (by id) (first 16 * bytes of it). * * @param userId * @param data * @return The base64 encoded result (url safe). * @see Crypt#encrypt(String, String) */ public String encrypt(final Integer userId, final String data) { final String authenticationToken = StringUtils.rightPad(getCachedAuthenticationToken(userId), 32, "x"); return Crypt.encrypt(authenticationToken, data); }
private void encryption(final String password, final String data) { final String encryptedString = Crypt.encrypt(password, data); final String decrpytedString = Crypt.decrypt(password, encryptedString); Assert.assertEquals(data, decrpytedString); } }