skey.h 922 B

1234567891011121314151617181920212223242526272829303132
  1. /*
  2. * Copyright 2025 The OpenSSL Project Authors. All Rights Reserved.
  3. *
  4. * Licensed under the Apache License 2.0 (the "License"). You may not use
  5. * this file except in compliance with the License. You can obtain a copy
  6. * in the file LICENSE in the source distribution or at
  7. * https://www.openssl.org/source/license.html
  8. */
  9. #ifndef OSSL_CRYPTO_SKEY_H
  10. # define OSSL_CRYPTO_SKEY_H
  11. /* Known symmetric key type definitions */
  12. # define SKEY_TYPE_GENERIC 1 /* generic bytes container unknown key types */
  13. # define SKEY_TYPE_AES 2 /* AES keys */
  14. struct prov_skey_st {
  15. /*
  16. * Internal skey implementation,
  17. * A symmetric key is basically just a buffer of bytes of
  18. * defined length, and a type, that defines, what
  19. * cryptosystem the key is meant for (AES, HMAC, etc...)
  20. */
  21. OSSL_LIB_CTX *libctx;
  22. int type;
  23. unsigned char *data;
  24. size_t length;
  25. };
  26. #endif /* OSSL_CRYPTO_SKEY_H */