- formatting code using astyle

Conflicts:
	libarmbox/dmx.cpp
	libgeneric-pc/video_lib.h
	libspark/dmx.cpp

Signed-off-by: Thilo Graf <dbt@novatux.de>
This commit is contained in:
svenhoefer
2021-05-17 23:47:39 +02:00
committed by Thilo Graf
parent 42264ba4af
commit 7e5b1fc5d2
161 changed files with 13043 additions and 11396 deletions

View File

@@ -11,7 +11,8 @@ int aes_xcbc_mac_init(struct aes_xcbc_mac_ctx *ctx, const uint8_t *key)
AES_set_encrypt_key(key, 128, &aes_key);
for (y = 0; y < 3; y++) {
for (y = 0; y < 3; y++)
{
for (x = 0; x < 16; x++)
ctx->K[y][x] = y + 1;
AES_ecb_encrypt(ctx->K[y], ctx->K[y], &aes_key, 1);
@@ -28,8 +29,10 @@ int aes_xcbc_mac_init(struct aes_xcbc_mac_ctx *ctx, const uint8_t *key)
int aes_xcbc_mac_process(struct aes_xcbc_mac_ctx *ctx, const uint8_t *in, unsigned int len)
{
while (len) {
if (ctx->buflen == 16) {
while (len)
{
if (ctx->buflen == 16)
{
AES_ecb_encrypt(ctx->IV, ctx->IV, &ctx->key, 1);
ctx->buflen = 0;
}
@@ -44,11 +47,14 @@ int aes_xcbc_mac_done(struct aes_xcbc_mac_ctx *ctx, uint8_t *out)
{
int i;
if (ctx->buflen == 16) {
if (ctx->buflen == 16)
{
/* K2 */
for (i = 0; i < 16; i++)
ctx->IV[i] ^= ctx->K[1][i];
} else {
}
else
{
ctx->IV[ctx->buflen] ^= 0x80;
/* K3 */
for (i = 0; i < 16; i++)