test_class.declarator: encryCredentialManager
test_class.modifier: private
test_class.original_string: private EncryCredentialManagerImpl encryCredentialManager;
test_class.type: EncryCredentialManagerImpl
test_class.var_name: encryCredentialManager
test_class.file: ki4so-common/src/test/java/com/github/ebnew/ki4so/core/authentication/EncryCredentialManagerImplTest.java
test_class.identifier: EncryCredentialManagerImplTest
test_case.body: @Test
  	public void testDecrypt() throws UnsupportedEncodingException {
  		
  		/**
  		 * 测试异常输入的情况，当加密的用户凭据为空的情况。
  		 */
  		Assert.assertNull(this.encryCredentialManager.decrypt(null));
  		EncryCredential encryCredential = new EncryCredential(null);
  		Assert.assertNull(this.encryCredentialManager.decrypt(encryCredential));
  		encryCredential = new EncryCredential("");
  		Assert.assertNull(this.encryCredentialManager.decrypt(encryCredential));
  		
  		
  		/**
  		 * 测试异常输入的情况，当加密的用户凭据不合法的情况。
  		 */
  		encryCredential = new EncryCredential("sdafdasfdsafdsa");
  		try{
  			this.encryCredentialManager.decrypt(encryCredential);
  			Assert.fail("invalid encry credential ,should trhow an exception.");
  		}
  		catch (InvalidEncryCredentialException e) {
  			
  		}
  	}
test_case.class_method_signature: EncryCredentialManagerImplTest.testDecrypt()
test_case.full_signature: @Test public void testDecrypt()
test_case.identifier: testDecrypt
test_case.invocations: assertNull decrypt assertNull decrypt assertNull decrypt decrypt fail
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testDecrypt()
focal_class.declarator: keyService
focal_class.modifier: private
focal_class.original_string: private KeyService keyService;
focal_class.type: KeyService
focal_class.var_name: keyService
focal_class.declarator: LOGGER = Logger.getLogger(EncryCredentialManagerImpl.class.getName())
focal_class.modifier: private static final
focal_class.original_string: private static final Logger LOGGER = Logger.getLogger(EncryCredentialManagerImpl.class.getName());
focal_class.type: Logger
focal_class.var_name: LOGGER
focal_class.file: ki4so-common/src/main/java/com/github/ebnew/ki4so/core/authentication/EncryCredentialManagerImpl.java
focal_class.identifier: EncryCredentialManagerImpl
focal_class.interfaces: implements EncryCredentialManager
focal_class.class_method_signature: EncryCredentialManagerImpl.setKeyService(KeyService keyService)
focal_class.full_signature: public void setKeyService(KeyService keyService)
focal_class.identifier: setKeyService
focal_class.modifiers: public
focal_class.parameters: (KeyService keyService)
focal_class.return: void
focal_class.signature: void setKeyService(KeyService keyService)
focal_class.class_method_signature: EncryCredentialManagerImpl.decrypt(EncryCredential encryCredential)
focal_class.full_signature: @Override public EncryCredentialInfo decrypt(EncryCredential encryCredential)
focal_class.identifier: decrypt
focal_class.modifiers: @Override public
focal_class.parameters: (EncryCredential encryCredential)
focal_class.return: EncryCredentialInfo
focal_class.signature: EncryCredentialInfo decrypt(EncryCredential encryCredential)
focal_class.class_method_signature: EncryCredentialManagerImpl.parseEncryCredential(String credential)
focal_class.full_signature: private EncryCredentialInfo parseEncryCredential(String credential)
focal_class.identifier: parseEncryCredential
focal_class.modifiers: private
focal_class.parameters: (String credential)
focal_class.return: EncryCredentialInfo
focal_class.signature: EncryCredentialInfo parseEncryCredential(String credential)
focal_class.class_method_signature: EncryCredentialManagerImpl.encrypt(EncryCredentialInfo encryCredentialInfo)
focal_class.full_signature: @Override public String encrypt(EncryCredentialInfo encryCredentialInfo)
focal_class.identifier: encrypt
focal_class.modifiers: @Override public
focal_class.parameters: (EncryCredentialInfo encryCredentialInfo)
focal_class.return: String
focal_class.signature: String encrypt(EncryCredentialInfo encryCredentialInfo)
focal_class.class_method_signature: EncryCredentialManagerImpl.encryptSensitiveInfo(EncryCredentialInfo encryCredentialInfo)
focal_class.full_signature: private String encryptSensitiveInfo(EncryCredentialInfo encryCredentialInfo)
focal_class.identifier: encryptSensitiveInfo
focal_class.modifiers: private
focal_class.parameters: (EncryCredentialInfo encryCredentialInfo)
focal_class.return: String
focal_class.signature: String encryptSensitiveInfo(EncryCredentialInfo encryCredentialInfo)
focal_class.class_method_signature: EncryCredentialManagerImpl.checkEncryCredentialInfo(
  			EncryCredentialInfo encryCredentialInfo)
focal_class.full_signature: @Override public boolean checkEncryCredentialInfo(
  			EncryCredentialInfo encryCredentialInfo)
focal_class.identifier: checkEncryCredentialInfo
focal_class.modifiers: @Override public
focal_class.parameters: (
  			EncryCredentialInfo encryCredentialInfo)
focal_class.return: boolean
focal_class.signature: boolean checkEncryCredentialInfo(
  			EncryCredentialInfo encryCredentialInfo)
focal_class.class_method_signature: EncryCredentialManagerImpl.getCurrentDate()
focal_class.full_signature: private Date getCurrentDate()
focal_class.identifier: getCurrentDate
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: Date
focal_class.signature: Date getCurrentDate()
focal_method.body: @Override
  	public EncryCredentialInfo decrypt(EncryCredential encryCredential) {
  		//不为空。
  		if(encryCredential!=null && !StringUtils.isEmpty(encryCredential.getCredential())){
  			String credential = encryCredential.getCredential();
  			return parseEncryCredential(credential);
  		}
  		//若为空信息，则返回空。
  		return null;
  	}
focal_method.class_method_signature: EncryCredentialManagerImpl.decrypt(EncryCredential encryCredential)
focal_method.full_signature: @Override public EncryCredentialInfo decrypt(EncryCredential encryCredential)
focal_method.identifier: decrypt
focal_method.invocations: isEmpty getCredential getCredential parseEncryCredential
focal_method.modifiers: @Override public
focal_method.parameters: (EncryCredential encryCredential)
focal_method.return: EncryCredentialInfo
focal_method.signature: EncryCredentialInfo decrypt(EncryCredential encryCredential)