code: protected final NameID decryptEncryptedId(final EncryptedID encryptedId, final Decrypter decrypter) throws SAMLException {
          if (encryptedId == null) {
              return null;
          }
          if (decrypter == null) {
              logger.warn("Encrypted attributes returned, but no keystore was provided.");
              return null;
          }
  
          try {
              final NameID decryptedId = (NameID) decrypter.decrypt(encryptedId);
              return decryptedId;
          } catch (final DecryptionException e) {
              throw new SAMLNameIdDecryptionException("Decryption of an EncryptedID failed.", e);
          }
      }
docs: Decrypts an EncryptedID, using a decrypter.
  
  @param encryptedId The EncryptedID to be decrypted.
  @param decrypter   The decrypter to use.
  @return Decrypted ID or {@code null} if any input is {@code null}.
  @throws SAMLException If the input ID cannot be decrypted.