@Test public void testEncode2() throws KettleValueException { KettleTwoWayPasswordEncoder encoder = new KettleTwoWayPasswordEncoder(); String encryption; encryption = encoder.encode( null ); assertTrue( "Encrypted ".equals( encryption ) ); encryption = encoder.encode( "" ); assertTrue( "Encrypted ".equals( encryption ) ); encryption = encoder.encode( "String" ); assertTrue( "Encrypted 2be98afc86aa7f2e4cb799d64cc9ba1dd".equals( encryption ) ); encryption = encoder.encode( " ${VAR} String" ); assertTrue( " ${VAR} String".equals( encryption ) ); encryption = encoder.encode( " %%VAR%% String" ); assertTrue( " %%VAR%% String".equals( encryption ) ); encryption = encoder.encode( " %% VAR String" ); assertTrue( "Encrypted 2be988fed4f87a4a599599d64cc9ba1dd".equals( encryption ) ); encryption = encoder.encode( "${%%$$$$" ); assertTrue( "Encrypted 2be98afc86aa7f2e4ef02eb359ad6eb9e".equals( encryption ) ); }
@Override public String encode( String rawPassword ) { return encode( rawPassword, true ); }
KettleTwoWayPasswordEncoder implements TwoWayPasswordEncoderInterface { @Override public String encode( String rawPassword ) { return encode( rawPassword, true ); } }
KettleTwoWayPasswordEncoder implements TwoWayPasswordEncoderInterface { @Override public String encode( String rawPassword ) { return encode( rawPassword, true ); } KettleTwoWayPasswordEncoder(); }
KettleTwoWayPasswordEncoder implements TwoWayPasswordEncoderInterface { @Override public String encode( String rawPassword ) { return encode( rawPassword, true ); } KettleTwoWayPasswordEncoder(); @Override void init(); @Override String encode( String rawPassword ); @Override String encode( String rawPassword, boolean includePrefix ); @Override String decode( String encodedPassword ); @Override String decode( String encodedPassword, boolean optionallyEncrypted ); @Override String[] getPrefixes(); static final String encryptPasswordIfNotUsingVariables( String password ); static final String decryptPasswordOptionallyEncrypted( String password ); static final String encryptPassword( String password ); static final String decryptPassword( String encrypted ); }
KettleTwoWayPasswordEncoder implements TwoWayPasswordEncoderInterface { @Override public String encode( String rawPassword ) { return encode( rawPassword, true ); } KettleTwoWayPasswordEncoder(); @Override void init(); @Override String encode( String rawPassword ); @Override String encode( String rawPassword, boolean includePrefix ); @Override String decode( String encodedPassword ); @Override String decode( String encodedPassword, boolean optionallyEncrypted ); @Override String[] getPrefixes(); static final String encryptPasswordIfNotUsingVariables( String password ); static final String decryptPasswordOptionallyEncrypted( String password ); static final String encryptPassword( String password ); static final String decryptPassword( String encrypted ); static final String PASSWORD_ENCRYPTED_PREFIX; }