String masterPasswd = cipher.decryptDecorated( master, DefaultSecDispatcher.SYSTEM_PROPERTY_SEC_LOCATION ); System.out.println( cipher.encryptAndDecorate( passwd, masterPasswd ) );
private static String decodePassword(final String encodedPassword, final String key) throws PlexusCipherException { final DefaultPlexusCipher cipher = new DefaultPlexusCipher(); return cipher.decryptDecorated(encodedPassword, key); }
private static String decodePassword(String encodedPassword, String key) throws PlexusCipherException { DefaultPlexusCipher cipher = new DefaultPlexusCipher(); return cipher.decryptDecorated(encodedPassword, key); }
private String encryptAndDecorate( String passwd ) throws IllegalStateException, SecDispatcherException, PlexusCipherException { String configurationFile = secDispatcher.getConfigurationFile(); if ( configurationFile.startsWith( "~" ) ) { configurationFile = System.getProperty( "user.home" ) + configurationFile.substring( 1 ); } String file = System.getProperty( DefaultSecDispatcher.SYSTEM_PROPERTY_SEC_LOCATION, configurationFile ); String master = null; SettingsSecurity sec = SecUtil.read( file, true ); if ( sec != null ) { master = sec.getMaster(); } if ( master == null ) { throw new IllegalStateException( "Master password is not set in the setting security file: " + file ); } DefaultPlexusCipher cipher = new DefaultPlexusCipher(); String masterPasswd = cipher.decryptDecorated( master, DefaultSecDispatcher.SYSTEM_PROPERTY_SEC_LOCATION ); return cipher.encryptAndDecorate( passwd, masterPasswd ); }
private String encryptAndDecorate( String passwd ) throws IllegalStateException, SecDispatcherException, PlexusCipherException { String configurationFile = secDispatcher.getConfigurationFile(); if ( configurationFile.startsWith( "~" ) ) { configurationFile = System.getProperty( "user.home" ) + configurationFile.substring( 1 ); } String file = System.getProperty( DefaultSecDispatcher.SYSTEM_PROPERTY_SEC_LOCATION, configurationFile ); String master = null; SettingsSecurity sec = SecUtil.read( file, true ); if ( sec != null ) { master = sec.getMaster(); } if ( master == null ) { throw new IllegalStateException( "Master password is not set in the setting security file: " + file ); } DefaultPlexusCipher cipher = new DefaultPlexusCipher(); String masterPasswd = cipher.decryptDecorated( master, DefaultSecDispatcher.SYSTEM_PROPERTY_SEC_LOCATION ); return cipher.encryptAndDecorate( passwd, masterPasswd ); }
String masterPasswd = cipher.decryptDecorated( master, DefaultSecDispatcher.SYSTEM_PROPERTY_SEC_LOCATION ); cliRequest.stdout.println( cipher.encryptAndDecorate( passwd, masterPasswd ) );
String masterPasswd = cipher.decryptDecorated( master, DefaultSecDispatcher.SYSTEM_PROPERTY_SEC_LOCATION ); System.out.println( cipher.encryptAndDecorate( passwd, masterPasswd ) );
String masterPasswd = cipher.decryptDecorated( master, DefaultSecDispatcher.SYSTEM_PROPERTY_SEC_LOCATION ); System.out.println( cipher.encryptAndDecorate( passwd, masterPasswd ) );
String masterPasswd = cipher.decryptDecorated( master, DefaultSecDispatcher.SYSTEM_PROPERTY_SEC_LOCATION ); System.out.println( cipher.encryptAndDecorate( passwd, masterPasswd ) );
String masterPasswd = cipher.decryptDecorated( master, DefaultSecDispatcher.SYSTEM_PROPERTY_SEC_LOCATION ); cliRequest.stdout.println( cipher.encryptAndDecorate( passwd, masterPasswd ) );
SettingsSecurity settingsSecurity = SecUtil.read(SETTINGS_SECURITY_FILE_LOCATION, true); masterPassword = cipher.decryptDecorated( settingsSecurity.getMaster(), DefaultSecDispatcher.SYSTEM_PROPERTY_SEC_LOCATION); hasSettingsSecurity = true; if (cipher.isEncryptedString(server.getPassword())) { if (hasSettingsSecurity) { server.setPassword(cipher.decryptDecorated(server.getPassword(), masterPassword)); } else { throw new RuntimeException( server.setPassphrase(cipher.decryptDecorated(server.getPassphrase(), masterPassword)); } else { throw new RuntimeException(
masterPassword = cipher.decryptDecorated(mavenSecuritySettings.getMaster(), masterMasterPassword); DefaultSecDispatcher dispatcher = new DefaultSecDispatcher(); DefaultSettingsDecrypter decrypter = new DefaultSettingsDecrypter();
String masterPasswd = cipher.decryptDecorated(master, SYSTEM_PROPERTY_SEC_LOCATION);