DefaultPlexusCipher cipher = new DefaultPlexusCipher(); cipher.encryptAndDecorate( passwd, DefaultSecDispatcher.SYSTEM_PROPERTY_SEC_LOCATION ) ); DefaultPlexusCipher cipher = new DefaultPlexusCipher(); String masterPasswd = cipher.decryptDecorated( master, DefaultSecDispatcher.SYSTEM_PROPERTY_SEC_LOCATION ); System.out.println( cipher.encryptAndDecorate( passwd, masterPasswd ) );
private boolean isEncryptedString(String str) { if (str == null) { return false; } return cipher.isEncryptedString(str); }
private static String decodePassword(final String encodedPassword, final String key) throws PlexusCipherException { final DefaultPlexusCipher cipher = new DefaultPlexusCipher(); return cipher.decryptDecorated(encodedPassword, key); }
public MavenSecDispatcher() { try { _cipher = new DefaultPlexusCipher(); } catch (PlexusCipherException e) { throw new RuntimeException(e); } } }
private String decrypt(String string, String password) { try { return cipher.decryptDecorated( string, password ); } catch (PlexusCipherException e) { log.warn( "Unable to decrypt Maven password using PlexusCipher", e ); return string; } } }
@Override public String decrypt(final String str, final String passPhrase) throws PlexusCipherException { if (str == null || str.length() < 1) { return str; } return cipher.decrypt64(str, passPhrase); }
@Override public String encrypt(final String str, final String passPhrase) throws PlexusCipherException { if (str == null || str.length() < 1) { return str; } return cipher.encrypt64(str, passPhrase); }
public MavenPlexusCipher() throws IllegalStateException { try { cipher = new PBECipher(); } catch (PlexusCipherException e) { throw new IllegalStateException("Unable to instantiate Cipher to decrypt Maven passwords"); } }
public String encrypt( String password, String encoding ) throws PlexusCipherException { if ( password != null ) { return plexusCipher.encryptAndDecorate( password, encoding ); } return null; }
private static String decodePassword(String encodedPassword, String key) throws PlexusCipherException { DefaultPlexusCipher cipher = new DefaultPlexusCipher(); return cipher.decryptDecorated(encodedPassword, key); }
public MavenSecDispatcher() { _configurationFile = "~/.m2/settings-security.xml"; try { _cipher = new DefaultPlexusCipher(); } catch (PlexusCipherException e) { LOGGER.error("Error creating sec dispatcher"); } } }
private boolean isEncryptedString(String str) { if (str == null) { return false; } return cipher.isEncryptedString(str); }
@Override public String decrypt(final String str, final String passPhrase) throws PlexusCipherException { if (str == null || str.length() < 1) { return str; } return cipher.decrypt64(str, passPhrase); }
@Override public String encrypt(final String str, final String passPhrase) throws PlexusCipherException { if (str == null || str.length() < 1) { return str; } return cipher.encrypt64(str, passPhrase); }
public MavenPlexusCipher() throws IllegalStateException { try { cipher = new PBECipher(); } catch (PlexusCipherException e) { throw new IllegalStateException("Unable to instantiate Cipher to decrypt Maven passwords"); } }
private static PlexusCipher buildCipher() { try { return new DefaultPlexusCipher(); } catch (PlexusCipherException e) { log.error( "Unable to create PlexusCipher in order to decrypt Maven passwords" ); return null; } }
private boolean isEncryptedString(String str) { if (str == null) { return false; } return cipher.isEncryptedString(str); }
@Override public String decrypt(final String str, final String passPhrase) throws PlexusCipherException { if (str == null || str.length() < 1) { return str; } return cipher.decrypt64(str, passPhrase); }
private boolean isEncryptedString( String str ) { if( str == null ) return false; return _cipher.isEncryptedString( str ); } //----------------------------------------------------------------------------
private boolean isEncryptedString( String str ) { return cipher.isEncryptedString( str ); }