Code example for NoSuchPaddingException

Methods: toString

0
		} catch (NoSuchProviderException e) {
			Log.e(TAG,"setPassword(): "+e.toString());
		} catch (NoSuchPaddingException e) {
			Log.e(TAG,"setPassword(): "+e.toString());
		} 
		 
		// Every time we set a new password, also the session key changes: 
		sessionKey = createNewSessionKey();
	} 
 
	private void setSalt(String saltIn) throws CryptoHelperException {
		if (saltIn==null) {
			String msg = "Salt must not be null.";
			throw new CryptoHelperException(msg);
		} 
		byte[] byteSaltIn=hexStringToBytes(saltIn);
 
		if (byteSaltIn.length != 8) {
			String msg = "Salt must be 8 bytes in length.";
			throw new CryptoHelperException(msg);
		}