text: /*
   * Copyright (c) 2015 Cossack Labs Limited
   *
   * Licensed under the Apache License, Version 2.0 (the "License");
   * you may not use this file except in compliance with the License.
   * You may obtain a copy of the License at
   *
   * http://www.apache.org/licenses/LICENSE-2.0
   *
   * Unless required by applicable law or agreed to in writing, software
   * distributed under the License is distributed on an "AS IS" BASIS,
   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   * See the License for the specific language governing permissions and
   * limitations under the License.
   */
  
  #ifndef THEMIS_MESSAGE_H
  #define THEMIS_MESSAGE_H
  
  #include <themis/themis_error.h>
  
  struct themis_message_type {
      size_t length;
      uint8_t* data;
  };
  
  typedef struct themis_message_type themis_message_t;
  
  themis_message_t* themis_message_init(const uint8_t* message, size_t message_length);
  themis_status_t themis_message_set(themis_message_t* ctx, const uint8_t* message, size_t message_length);
  
  const uint8_t* themis_message_get_data(themis_message_t* ctx);
  
  size_t themis_message_get_length(themis_message_t* ctx);
  
  themis_status_t themis_message_destroy(themis_message_t* ctx);
  
  #endif /* THEMIS_MESSAGE_H */
  