@Override public void initialize(Arguments args) throws DirectiveParseException { this.column = ((ColumnName) args.value("column")).value(); Text algorithm = args.value("algorithm"); if (!MessageHash.isValid(algorithm.value())) { throw new DirectiveParseException( String.format("Algorithm '%s' specified in directive '%s' at line %d is not supported", algorithm, NAME, args.line()) ); } try { this.digest = MessageDigest.getInstance(algorithm.value()); } catch (NoSuchAlgorithmException e) { throw new DirectiveParseException( String.format("Unable to find algorithm specified '%s' in directive '%s' at line %d.", algorithm, NAME, args.line()) ); } this.encode = false; if(args.contains("encode")) { this.encode = ((Bool) args.value("encode")).value(); } }