优化
This commit is contained in:
parent
abf85e1cbd
commit
d420e58926
1
Makefile
1
Makefile
@ -7,6 +7,7 @@ OBJ := sha
|
||||
|
||||
all: aes.o sha.o
|
||||
$(CC) $(CFLAGS) -o $(OBJ) $^ $(LDFLAGS)
|
||||
$(STRIP) $(OBJ)
|
||||
.c.o:
|
||||
$(CC) $(CFLAGS) -c $<
|
||||
|
||||
|
10
README.md
10
README.md
@ -18,13 +18,15 @@
|
||||
|
||||
## Help Information
|
||||
|
||||
SHA
|
||||
SHA
|
||||
Shell Strict AES 128 bit encryption tool
|
||||
AUTHOR: AIXIAO@AIXIAO.ME
|
||||
Author: AIXIAO@AIXIAO.ME
|
||||
|
||||
Usage:
|
||||
-k : key
|
||||
-f : Script file
|
||||
sha [-kfh?]
|
||||
-k : Key
|
||||
-f : Script File
|
||||
-h -? : Print Help
|
||||
|
||||
|
||||
静态链接:
|
||||
|
3
aes.c
3
aes.c
@ -2,7 +2,6 @@
|
||||
|
||||
#include "aes.h"
|
||||
|
||||
|
||||
#define Nb 4
|
||||
|
||||
#if defined(AES256) && (AES256 == 1)
|
||||
@ -174,7 +173,7 @@ static void ShiftRows(state_t * state)
|
||||
(*state)[1][1] = (*state)[2][1];
|
||||
(*state)[2][1] = (*state)[3][1];
|
||||
(*state)[3][1] = temp;
|
||||
|
||||
|
||||
temp = (*state)[0][2];
|
||||
(*state)[0][2] = (*state)[2][2];
|
||||
(*state)[2][2] = temp;
|
||||
|
5
aes.h
5
aes.h
@ -1,6 +1,11 @@
|
||||
#ifndef _AES_H_
|
||||
#define _AES_H_
|
||||
|
||||
#include <unistd.h>
|
||||
#include <time.h>
|
||||
#include <sys/time.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stddef.h>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user