sqliterk_crypto.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. /*
  2. * Tencent is pleased to support the open source community by making
  3. * WCDB available.
  4. *
  5. * Copyright (C) 2017 THL A29 Limited, a Tencent company.
  6. * All rights reserved.
  7. *
  8. * Licensed under the BSD 3-Clause License (the "License"); you may not use
  9. * this file except in compliance with the License. You may obtain a copy of
  10. * the License at
  11. *
  12. * https://opensource.org/licenses/BSD-3-Clause
  13. *
  14. * Unless required by applicable law or agreed to in writing, software
  15. * distributed under the License is distributed on an "AS IS" BASIS,
  16. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  17. * See the License for the specific language governing permissions and
  18. * limitations under the License.
  19. */
  20. #ifndef sqliterk_crypto_h
  21. #define sqliterk_crypto_h
  22. #ifdef __cplusplus
  23. extern "C" {
  24. #endif
  25. typedef struct sqliterk_file sqliterk_file;
  26. typedef struct sqliterk_pager sqliterk_pager;
  27. typedef struct codec_ctx sqliterk_codec;
  28. typedef struct sqliterk_cipher_conf sqliterk_cipher_conf;
  29. int sqliterkCryptoSetCipher(sqliterk_pager *pager,
  30. sqliterk_file *fd,
  31. const sqliterk_cipher_conf *conf);
  32. void sqliterkCryptoFreeCodec(sqliterk_pager *pager);
  33. int sqliterkCryptoDecode(sqliterk_codec *codec, int pgno, void *data);
  34. #ifdef __cplusplus
  35. }
  36. #endif
  37. #endif