libzpc 1.5
IBM Z Protected-key Crypto library
Loading...
Searching...
No Matches
aes_ecb.h
Go to the documentation of this file.
1/*
2 * Copyright IBM Corp. 2021
3 *
4 * libzpc is free software; you can redistribute it and/or modify
5 * it under the terms of the MIT license. See LICENSE for details.
6 */
7
8#ifndef ZPC_AES_ECB_H
9# define ZPC_AES_ECB_H
10# ifdef __cplusplus
11/* *INDENT-OFF* */
12extern "C" {
13/* *INDENT-ON* */
14# endif
15
25
26# include <zpc/aes_key.h>
27# include <stddef.h>
28
29struct zpc_aes_ecb;
30
36__attribute__((visibility("default")))
37int zpc_aes_ecb_alloc(struct zpc_aes_ecb **ctx);
44__attribute__((visibility("default")))
45int zpc_aes_ecb_set_key(struct zpc_aes_ecb *ctx, struct zpc_aes_key *key);
54__attribute__((visibility("default")))
55int zpc_aes_ecb_encrypt(struct zpc_aes_ecb *ctx, unsigned char *ct,
56 const unsigned char *pt, size_t ptlen);
65__attribute__((visibility("default")))
66int zpc_aes_ecb_decrypt(struct zpc_aes_ecb *ctx, unsigned char *pt,
67 const unsigned char *ct, size_t ctlen);
72__attribute__((visibility("default")))
73void zpc_aes_ecb_free(struct zpc_aes_ecb **ctx);
74
75# ifdef __cplusplus
76/* *INDENT-OFF* */
77}
78/* *INDENT-ON* */
79# endif
80#endif
int zpc_aes_ecb_encrypt(struct zpc_aes_ecb *ctx, unsigned char *ct, const unsigned char *pt, size_t ptlen)
int zpc_aes_ecb_alloc(struct zpc_aes_ecb **ctx)
int zpc_aes_ecb_decrypt(struct zpc_aes_ecb *ctx, unsigned char *pt, const unsigned char *ct, size_t ctlen)
void zpc_aes_ecb_free(struct zpc_aes_ecb **ctx)
int zpc_aes_ecb_set_key(struct zpc_aes_ecb *ctx, struct zpc_aes_key *key)
AES key API.