@@ -25,7 +25,7 @@ pub const SIGNATUREBYTES: uint = ffi::crypto_sign_ed25519_BYTES as uint;
2525 * When a `Seed` goes out of scope its contents
2626 * will be zeroed out
2727 */
28- pub struct Seed ( pub [ u8 , .. SEEDBYTES ] ) ;
28+ pub struct Seed ( pub [ u8 ; SEEDBYTES ] ) ;
2929
3030newtype_drop ! ( Seed ) ;
3131newtype_clone ! ( Seed ) ;
@@ -37,7 +37,7 @@ newtype_impl!(Seed, SEEDBYTES);
3737 * When a `SecretKey` goes out of scope its contents
3838 * will be zeroed out
3939 */
40- pub struct SecretKey ( pub [ u8 , .. SECRETKEYBYTES ] ) ;
40+ pub struct SecretKey ( pub [ u8 ; SECRETKEYBYTES ] ) ;
4141
4242newtype_drop ! ( SecretKey ) ;
4343newtype_clone ! ( SecretKey ) ;
@@ -47,7 +47,7 @@ newtype_impl!(SecretKey, SECRETKEYBYTES);
4747 * `PublicKey` for signatures
4848 */
4949#[ deriving( Copy ) ]
50- pub struct PublicKey ( pub [ u8 , .. PUBLICKEYBYTES ] ) ;
50+ pub struct PublicKey ( pub [ u8 ; PUBLICKEYBYTES ] ) ;
5151
5252newtype_clone ! ( PublicKey ) ;
5353newtype_impl ! ( PublicKey , PUBLICKEYBYTES ) ;
@@ -62,8 +62,8 @@ newtype_impl!(PublicKey, PUBLICKEYBYTES);
6262 */
6363pub fn gen_keypair ( ) -> ( PublicKey , SecretKey ) {
6464 unsafe {
65- let mut pk = [ 0u8 , .. PUBLICKEYBYTES ] ;
66- let mut sk = [ 0u8 , .. SECRETKEYBYTES ] ;
65+ let mut pk = [ 0u8 ; PUBLICKEYBYTES ] ;
66+ let mut sk = [ 0u8 ; SECRETKEYBYTES ] ;
6767 ffi:: crypto_sign_ed25519_keypair ( pk. as_mut_ptr ( ) , sk. as_mut_ptr ( ) ) ;
6868 ( PublicKey ( pk) , SecretKey ( sk) )
6969 }
@@ -75,8 +75,8 @@ pub fn gen_keypair() -> (PublicKey, SecretKey) {
7575 */
7676pub fn keypair_from_seed ( & Seed ( seed) : & Seed ) -> ( PublicKey , SecretKey ) {
7777 unsafe {
78- let mut pk = [ 0u8 , .. PUBLICKEYBYTES ] ;
79- let mut sk = [ 0u8 , .. SECRETKEYBYTES ] ;
78+ let mut pk = [ 0u8 ; PUBLICKEYBYTES ] ;
79+ let mut sk = [ 0u8 ; SECRETKEYBYTES ] ;
8080 ffi:: crypto_sign_ed25519_seed_keypair ( pk. as_mut_ptr ( ) ,
8181 sk. as_mut_ptr ( ) ,
8282 seed. as_ptr ( ) ) ;
@@ -158,7 +158,7 @@ fn test_sign_verify_tamper() {
158158fn test_sign_verify_seed ( ) {
159159 use randombytes:: { randombytes, randombytes_into} ;
160160 for i in range ( 0 , 256 u) {
161- let mut seedbuf = [ 0 , .. 32 ] ;
161+ let mut seedbuf = [ 0 ; 32 ] ;
162162 randombytes_into ( & mut seedbuf) ;
163163 let seed = Seed ( seedbuf) ;
164164 let ( pk, sk) = keypair_from_seed ( & seed) ;
@@ -173,7 +173,7 @@ fn test_sign_verify_seed() {
173173fn test_sign_verify_tamper_seed ( ) {
174174 use randombytes:: { randombytes, randombytes_into} ;
175175 for i in range ( 0 , 32 u) {
176- let mut seedbuf = [ 0 , .. 32 ] ;
176+ let mut seedbuf = [ 0 ; 32 ] ;
177177 randombytes_into ( & mut seedbuf) ;
178178 let seed = Seed ( seedbuf) ;
179179 let ( pk, sk) = keypair_from_seed ( & seed) ;
@@ -211,7 +211,7 @@ fn test_vectors() {
211211 let x3 = x. next ( ) . unwrap ( ) ;
212212 let seed_bytes = x0. slice ( 0 , 64 ) . from_hex ( ) . unwrap ( ) ;
213213 assert ! ( seed_bytes. len( ) == SEEDBYTES ) ;
214- let mut seedbuf = [ 0u8 , .. SEEDBYTES ] ;
214+ let mut seedbuf = [ 0u8 ; SEEDBYTES ] ;
215215 for ( s, b) in seedbuf. iter_mut ( ) . zip ( seed_bytes. iter ( ) ) {
216216 * s = * b
217217 }
@@ -232,7 +232,7 @@ mod bench {
232232 use randombytes:: randombytes;
233233 use super :: * ;
234234
235- const BENCH_SIZES : [ uint , .. 14 ] = [ 0 , 1 , 2 , 4 , 8 , 16 , 32 , 64 ,
235+ const BENCH_SIZES : [ uint ; 14 ] = [ 0 , 1 , 2 , 4 , 8 , 16 , 32 , 64 ,
236236 128 , 256 , 512 , 1024 , 2048 , 4096 ] ;
237237
238238 #[ bench]
0 commit comments