code: public static String encrypt(final String aText, final String aSalt) throws NullPointerException, IOException {
          Objects.requireNonNull(aText, LOGGER.getI18n("Text to encrypt is null"));
          Objects.requireNonNull(aSalt, LOGGER.getI18n("Salt to encrypt with is null"));
  
          try {
              final MessageDigest digest = MessageDigest.getInstance("SHA");
              final String saltedText = aText + aSalt;
              digest.update(saltedText.getBytes("UTF-8"));
              return Base64.encodeBytes(digest.digest());
          } catch (final NoSuchAlgorithmException details) {
              throw new I18nRuntimeException(details); // programming error
          } catch (final UnsupportedEncodingException details) {
              throw new I18nRuntimeException(details); // programming error
          }
      }
docs: Encrypts the supplied text using the supplied salt.
  
  @param aText The text to be encrypted
  @param aSalt The salt to use in the encryption
  @return The encrypted password
  @throws IOException If there is trouble encrypting the supplied text