@@ -149,7 +149,7 @@ macro_rules! define_aes_struct(
149
149
$rounds: expr
150
150
) => (
151
151
pub struct $name {
152
- sk: [ Bs8State <u32 >, ..$rounds + 1 ]
152
+ sk: [ Bs8State <u32 >, ..( $rounds + 1 ) ]
153
153
}
154
154
)
155
155
)
@@ -164,9 +164,9 @@ macro_rules! define_aes_impl(
164
164
impl $name {
165
165
pub fn new( key: & [ u8 ] ) -> $name {
166
166
let mut a = $name {
167
- sk: [ Bs8State ( 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 ) , ..$rounds + 1 ]
167
+ sk: [ Bs8State ( 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 ) , ..( $rounds + 1 ) ]
168
168
} ;
169
- let mut tmp = [ [ 0u32 , ..4 ] , ..$rounds + 1 ] ;
169
+ let mut tmp = [ [ 0u32 , ..4 ] , ..( $rounds + 1 ) ] ;
170
170
create_round_keys( key, $mode, tmp) ;
171
171
for i in range( 0 u, $rounds + 1 ) {
172
172
a. sk[ i] = bit_slice_4x4_with_u32( tmp[ i] [ 0 ] , tmp[ i] [ 1 ] , tmp[ i] [ 2 ] , tmp[ i] [ 3 ] ) ;
@@ -236,7 +236,7 @@ macro_rules! define_aes_struct_x8(
236
236
$rounds: expr
237
237
) => (
238
238
pub struct $name {
239
- sk: [ Bs8State <u32x4>, ..$rounds + 1 ]
239
+ sk: [ Bs8State <u32x4>, ..( $rounds + 1 ) ]
240
240
}
241
241
)
242
242
)
@@ -251,9 +251,9 @@ macro_rules! define_aes_impl_x8(
251
251
impl $name {
252
252
pub fn new( key: & [ u8 ] ) -> $name {
253
253
let mut a = $name {
254
- sk: [ Bs8State ( o!( ) , o!( ) , o!( ) , o!( ) , o!( ) , o!( ) , o!( ) , o!( ) ) , ..$rounds + 1 ]
254
+ sk: [ Bs8State ( o!( ) , o!( ) , o!( ) , o!( ) , o!( ) , o!( ) , o!( ) , o!( ) ) , ..( $rounds + 1 ) ]
255
255
} ;
256
- let mut tmp = [ [ 0u32 , ..4 ] , ..$rounds + 1 ] ;
256
+ let mut tmp = [ [ 0u32 , ..4 ] , ..( $rounds + 1 ) ] ;
257
257
create_round_keys( key, $mode, tmp) ;
258
258
for i in range( 0 u, $rounds + 1 ) {
259
259
a. sk[ i] = bit_slice_fill_4x4_with_u32x4(
0 commit comments