return text; Assert.notConcealed(text); char[] chars = text.toCharArray(); StringBuilder sb = new StringBuilder();
private void validate(EncContext ctx, boolean required, Optional<String> password) { Assert.notNull(ctx.getTextEncryptor(), "'textEncryptor' cannot be null"); Assert.notNull(ctx.getStrength(), "'strength' cannot be null"); if (required) { Assert.isTrue(ctx.getTextEncryptor().isPresent()); } if (password.isPresent()) { Assert.noBlanks(password.get()); Assert.notEncrypted(password.get()); Assert.notConcealed(password.get()); } }