Documentation
Tagion
Tiny_AES
tagion
crypto
aes
tiny_aes
tiny_aes
Undocumented in source.
@
safe
@
nogc
struct
Tiny_AES (
int
KEY_LENGTH
Mode
mode
=
Mode
.
CBC
) {
pure nothrow
enum
KEY_SIZE
;
pure nothrow
enum
BLOCK_SIZE
;
pure nothrow
enum
Nb
;
pure nothrow
static if
(
KEY_LENGTH is 256
)
enum
Nk
;
pure nothrow
static if
(
KEY_LENGTH is 256
)
enum
Nr
;
pure nothrow
static if
(
KEY_LENGTH is 256
)
enum
keyExpSize
;
pure nothrow
static if
(!(
KEY_LENGTH is 256
))
static if
(
KEY_LENGTH is 192
)
enum
Nk
;
pure nothrow
static if
(!(
KEY_LENGTH is 256
))
static if
(
KEY_LENGTH is 192
)
enum
Nr
;
pure nothrow
static if
(!(
KEY_LENGTH is 256
))
static if
(
KEY_LENGTH is 192
)
enum
keyExpSize
;
pure nothrow
static if
(!(
KEY_LENGTH is 256
))
static if
(!(
KEY_LENGTH is 192
))
static if
(
KEY_LENGTH is 128
)
enum
Nk
;
pure nothrow
static if
(!(
KEY_LENGTH is 256
))
static if
(!(
KEY_LENGTH is 192
))
static if
(
KEY_LENGTH is 128
)
enum
Nr
;
pure nothrow
static if
(!(
KEY_LENGTH is 256
))
static if
(!(
KEY_LENGTH is 192
))
static if
(
KEY_LENGTH is 128
)
enum
keyExpSize
;
alias
state_t
=
ubyte
[
4
][
4
]
;
pure nothrow shared static
immutable
(
ubyte
[
256
])
sbox
;
pure nothrow shared static
immutable
(
ubyte
[
256
])
rsbox
;
pure nothrow
enum
Rcon
;
pure nothrow
Context
ctx
;
static if
(
mode is Mode.ECB
)
void
encrypt
(ubyte[] buf);
static if
(
mode is Mode.ECB
)
void
decrypt
(ubyte[] buf);
}
Members
Aliases
state_t
alias
state_t
=
ubyte
[
4
][
4
]
Functions
decrypt
void
decrypt
(ubyte[] buf)
encrypt
void
encrypt
(ubyte[] buf)
tagion
crypto
aes
tiny_aes
tiny_aes
structs
Tiny_AES