src/main/java/com/hedera/hashgraph/identity/hcs/MessageEnvelope.java
/**
   * Encrypts the message in this envelope and returns its encrypted instance.
   *
   * @param encrypter The function used to encrypt the message.
   * @return This envelope instance.
   */
Encrypts the message in this envelope and returns its encrypted instance.
@param encrypter The function used to encrypt the message.
@return This envelope instance.
Encrypts the message in this envelope and returns its encrypted instance . @param encrypter The function used to encrypt the message . @return This envelope instance .
public MessageEnvelope<T> encrypt(final UnaryOperator<T> encrypter) {
    if (encrypter == null) {
      throw new IllegalArgumentException("The encryption function is not provided.");
    }
    this.decryptedMessage = message;
    this.message = encrypter.apply(message);
    this.mode = MessageMode.ENCRYPTED;
    return this;
  }
public MessageEnvelope < T > encrypt ( final UnaryOperator < T > encrypter ) { if ( encrypter == null ) { throw new IllegalArgumentException ( "The encryption function is not provided." ) ; } this . decryptedMessage = message ; this . message = encrypter . apply ( message ) ; this . mode = MessageMode . ENCRYPTED ; return this ; }
Encrypts the message in this envelope and returns its encrypted instance.
Encrypts the message in this envelope and returns its encrypted instance .