<p>
Encryption context to use when the data is reencrypted.
</p>

@param destinationEncryptionContext
Encryption context to use when the data is reencrypted.
@return Returns a reference to this object so that method calls can be chained together.
7639
public ReEncryptRequest withDestinationEncryptionContext(java.util.Map<String, String> destinationEncryptionContext) {
        setDestinationEncryptionContext(destinationEncryptionContext);
        return this;
    }
105728
public Map<String, Object> rebuildIndex(String destinationIndex) {
		MultivaluedMap<String, String> params = new MultivaluedHashMap<>();
		params.putSingle("destinationIndex", destinationIndex);
		return getEntity(invokeSignedRequest(getApiClient(), accessKey, key(true), POST,
				getEndpoint(), getFullPath("_reindex"), null, params, new byte[0]), Map.class);
	}
634064
@Override
  public <CS, CD> MappingContext<CS, CD> create(CS source, Class<CD> destinationType) {
    Assert.notNull(source, "source");
    Assert.notNull(destinationType, "destinationType");

    return new MappingContextImpl<CS, CD>(this, source, Types.<CS>deProxy(source.getClass()), null,
        destinationType, null, null, false);
  }
667232
public void enableKerberosAuthentication(final String loginContextEntryKey) {
       try {
           LoginContext lc = new LoginContext(loginContextEntryKey);
           lc.login();
           m_subject = lc.getSubject();
       } catch (SecurityException | LoginException ex) {
           throw new IllegalArgumentException("Cannot determine client consumer's credentials", ex);
       }
    }
1277976
public static DestinationAddressAttribute createDestinationAddressAttribute(
			TransportAddress address) {
		DestinationAddressAttribute attribute = new DestinationAddressAttribute();

		attribute.setAddress(address);

		return attribute;
	}
729884
public java.util.Map<String, String> getSourceEncryptionContext() {
        if (sourceEncryptionContext == null) {
            sourceEncryptionContext = new com.ibm.cloud.objectstorage.internal.SdkInternalMap<String, String>();
        }
        return sourceEncryptionContext;
    }
339290
public byte[] decrypt(byte[] encrypted) throws AESException {
        try {
            SecretKeySpec skeySpec = new SecretKeySpec(secretKey, ENCRYPTION_ALGORITHM);
            Cipher cipher = Cipher.getInstance(ENCRYPTION_ALGORITHM);
            cipher.init(Cipher.DECRYPT_MODE, skeySpec);
            return cipher.doFinal(encrypted);
        } catch (NoSuchAlgorithmException e) {
            throw new AESException(e);
        } catch (NoSuchPaddingException e) {
            throw new AESException(e);
        } catch (InvalidKeyException e) {
            throw new AESException(e);
        } catch (IllegalBlockSizeException e) {
            throw new AESException(e);
        } catch (BadPaddingException e) {
            throw new AESException(e);
        }
    }
851819
@Override
	public final void setJMSDestination(Destination destination) throws JMSException
    {
    	assertDeserializationLevel(MessageSerializationLevel.FULL);
        this.destination = DestinationTools.asRef(destination);
    }
112026
public SignalServiceContent decrypt(SignalServiceEnvelope envelope)
      throws InvalidMetadataMessageException, InvalidMetadataVersionException,
      ProtocolInvalidKeyIdException, ProtocolLegacyMessageException,
      ProtocolUntrustedIdentityException, ProtocolNoSessionException,
      ProtocolInvalidVersionException, ProtocolInvalidMessageException,
      ProtocolInvalidKeyException, ProtocolDuplicateMessageException,
      SelfSendException

  {
    try {
      if (envelope.hasLegacyMessage()) {
        Plaintext plaintext = decrypt(envelope, envelope.getLegacyMessage());
        DataMessage message = DataMessage.parseFrom(plaintext.getData());
        return new SignalServiceContent(createSignalServiceMessage(plaintext.getMetadata(), message),
                                        plaintext.getMetadata().getSender(),
                                        plaintext.getMetadata().getSenderDevice(),
                                        plaintext.getMetadata().getTimestamp(),
                                        plaintext.getMetadata().isNeedsReceipt());
      } else if (envelope.hasContent()) {
        Plaintext plaintext = decrypt(envelope, envelope.getContent());
        Content   message   = Content.parseFrom(plaintext.getData());

        if (message.hasDataMessage()) {
          return new SignalServiceContent(createSignalServiceMessage(plaintext.getMetadata(), message.getDataMessage()),
                                          plaintext.getMetadata().getSender(),
                                          plaintext.getMetadata().getSenderDevice(),
                                          plaintext.getMetadata().getTimestamp(),
                                          plaintext.getMetadata().isNeedsReceipt());
        } else if (message.hasSyncMessage() && localAddress.getNumber().equals(plaintext.getMetadata().getSender())) {
          return new SignalServiceContent(createSynchronizeMessage(plaintext.getMetadata(), message.getSyncMessage()),
                                          plaintext.getMetadata().getSender(),
                                          plaintext.getMetadata().getSenderDevice(),
                                          plaintext.getMetadata().getTimestamp(),
                                          plaintext.getMetadata().isNeedsReceipt());
        } else if (message.hasCallMessage()) {
          return new SignalServiceContent(createCallMessage(message.getCallMessage()),
                                          plaintext.getMetadata().getSender(),
                                          plaintext.getMetadata().getSenderDevice(),
                                          plaintext.getMetadata().getTimestamp(),
                                          plaintext.getMetadata().isNeedsReceipt());
        } else if (message.hasReceiptMessage()) {
          return new SignalServiceContent(createReceiptMessage(plaintext.getMetadata(), message.getReceiptMessage()),
                                          plaintext.getMetadata().getSender(),
                                          plaintext.getMetadata().getSenderDevice(),
                                          plaintext.getMetadata().getTimestamp(),
                                          plaintext.getMetadata().isNeedsReceipt());
        } else if (message.hasTypingMessage()) {
          return new SignalServiceContent(createTypingMessage(plaintext.getMetadata(), message.getTypingMessage()),
                                          plaintext.getMetadata().getSender(),
                                          plaintext.getMetadata().getSenderDevice(),
                                          plaintext.getMetadata().getTimestamp(),
                                          false);
        }
      }

      return null;
    } catch (InvalidProtocolBufferException e) {
      throw new InvalidMetadataMessageException(e);
    }
  }
310367
public static DestinationUrl createDestinationUrl(String destination) {
        String[] split = splitDestination(destination);
        String host = split[0].trim();
        String jmsDestination = split[1].trim();
        return new DestinationUrl(host, jmsDestination);
    }
905802
public static ZipFileIndexCache instance(Context context) {
        ZipFileIndexCache instance = context.get(ZipFileIndexCache.class);
        if (instance == null)
            context.put(ZipFileIndexCache.class, instance = new ZipFileIndexCache());
        return instance;
    }
974422
public JMapper<D, S> destinationFactory(DestinationFactory<D> factory){
    	this.mapper.setDestinationFactory(factory);
    	return this;
    }
340363
public static <D,S> IJMapper<D, S> getMapper(final Class<D> destination, final Class<S> source){
		return getMapper(destination,source, undefinedConfig());
	}
978076
public static SecurityContext getSecurityContext() {
        Session session = ExecutionContext.getSession();
        @SuppressWarnings("resource")
        WebSocketSession ws = session == null ? null : session.getSocket();
        return ws == null ? null
                : (SecurityContext) ws.getAttributes().get(HttpSessionSecurityContextRepository.SPRING_SECURITY_CONTEXT_KEY);
    }
301799
@SuppressWarnings("unchecked")
    private static ISecurityContext getCasContext(ISecurityContext context) {
        if (context instanceof ICasSecurityContext) {
            return context;
        }
        Enumeration contextEnum = context.getSubContexts();
        while (contextEnum.hasMoreElements()) {
            ISecurityContext subContext = (ISecurityContext) contextEnum.nextElement();
            if (subContext instanceof ICasSecurityContext) {
                return subContext;
            }
        }
        return null;
    }
1083441
public void restoreSecurityContext(CacheContext context) {
		SavedAuthorization cached = context.get(CacheContext.SECURITY_CONTEXT_KEY, SavedAuthorization.class);
		if (cached != null) {
			log.debug("Restoring security context {}", cached);
			securityManager.restoreSecurityContext(cached);
		} else {
			securityManager.clearSecurityContext();
		}
	}
53092
public static void init(Context context, boolean shouldEncryptStorage) {
		if (context == null) {
			throw new IllegalArgumentException("Context is null");
		}

		// get the name of the alias
		KeyInfo keyInfo = resolveKeyInfo(context, shouldEncryptStorage);
		ApptentiveLog.v(SECURITY, "Secret key info: %s", keyInfo);

		// load or generate the key
		masterKey = resolveMasterKey(context, keyInfo);
	}