| 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 |
|
| 10 |
#ifndef OSSL_CRYPTO_SKEY_H |
| 11 |
#define OSSL_CRYPTO_SKEY_H |
| 12 |
|
| 13 |
/* Known symmetric key type definitions */ |
| 14 |
#define SKEY_TYPE_GENERIC 1 /* generic bytes container unknown key types */ |
| 15 |
#define SKEY_TYPE_AES 2 /* AES keys */ |
| 16 |
|
| 17 |
struct prov_skey_st { |
| 18 |
/* |
| 19 |
* Internal skey implementation, |
| 20 |
* A symmetric key is basically just a buffer of bytes of |
| 21 |
* defined length, and a type, that defines, what |
| 22 |
* cryptosystem the key is meant for (AES, HMAC, etc...) |
| 23 |
*/ |
| 24 |
OSSL_LIB_CTX *libctx; |
| 25 |
|
| 26 |
int type; |
| 27 |
|
| 28 |
unsigned char *data; |
| 29 |
size_t length; |
| 30 |
}; |
| 31 |
|
| 32 |
#endif /* OSSL_CRYPTO_SKEY_H */ |