79808182838485868788899091
String clusterId = args[0]; String value = args[1]; try { Codec codec = new HexCodecFactory().createCodec(clusterId); System.out.println(codec.encode(value)); } catch (SQLException e) { e.printStackTrace(System.err); }
162163164165166167168169170171172173174
String clusterId = args[0]; String value = args[1]; try { Codec codec = new CipherCodecFactory().createCodec(clusterId); System.out.println(codec.encode(value)); } catch (SQLException e) { e.printStackTrace(System.err); }
73747576777879808182
} @Test public void test() throws SQLException { Codec codec = new CipherCodecFactory().createCodec("cluster"); Assert.assertTrue(codec instanceof CipherCodec); Assert.assertEquals(this.key, ((CipherCodec) codec).getKey()); }
71727374757677787980818283
String clusterId = args[0]; String value = args[1]; try { Codec codec = new Base64CodecFactory().createCodec(clusterId); System.out.println(codec.encode(value)); } catch (SQLException e) { e.printStackTrace(System.err); }