@@ -42,9 +42,9 @@ fn test_stream_cipher_rabbit(
4242 let mut rabbit_cipher8 = RabbitKeyOnly :: new ( rabbit:: Key :: from_slice ( const8) ) ; // $ Sink
4343 rabbit_cipher8. apply_keystream ( & mut data) ;
4444
45- let const9: [ u16 ; 8 ] = [ 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 ] ; // $ Alert[rust/hard-coded-cryptographic-value]
45+ let const9: [ u16 ; 8 ] = [ 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 ] ; // $ MISSING: Alert[rust/hard-coded-cryptographic-value]
4646 let const9_conv = unsafe { const9. align_to :: < u8 > ( ) . 1 } ; // convert [u16;8] -> [u8;8]
47- let mut rabbit_cipher9 = RabbitKeyOnly :: new ( rabbit:: Key :: from_slice ( const9_conv) ) ; // $ Sink
47+ let mut rabbit_cipher9 = RabbitKeyOnly :: new ( rabbit:: Key :: from_slice ( const9_conv) ) ; // $ MISSING: Sink
4848 rabbit_cipher9. apply_keystream ( & mut data) ;
4949
5050 let const10: [ u8 ; 16 ] = unsafe { std:: mem:: zeroed ( ) } ; // $ Alert[rust/hard-coded-cryptographic-value]
@@ -63,8 +63,8 @@ fn test_block_cipher_aes(
6363 let aes_cipher1 = Aes256 :: new ( key256. into ( ) ) ;
6464 aes_cipher1. encrypt_block ( block128. into ( ) ) ;
6565
66- let const2 = & [ 0u8 ; 32 ] ; // $ Alert[rust/hard-coded-cryptographic-value]
67- let aes_cipher2 = Aes256 :: new ( const2. into ( ) ) ; // $ Sink
66+ let const2 = & [ 0u8 ; 32 ] ; // $ MISSING: Alert[rust/hard-coded-cryptographic-value]
67+ let aes_cipher2 = Aes256 :: new ( const2. into ( ) ) ; // $ MISSING: Sink
6868 aes_cipher2. encrypt_block ( block128. into ( ) ) ;
6969
7070 let aes_cipher3 = Aes256 :: new_from_slice ( key256) . unwrap ( ) ;
@@ -77,12 +77,12 @@ fn test_block_cipher_aes(
7777 let aes_cipher5 = cfb_mode:: Encryptor :: < aes:: Aes256 > :: new ( key. into ( ) , iv. into ( ) ) ;
7878 _ = aes_cipher5. encrypt_b2b ( input, output) . unwrap ( ) ;
7979
80- let const6 = & [ 0u8 ; 32 ] ; // $ Alert[rust/hard-coded-cryptographic-value]
81- let aes_cipher6 = cfb_mode:: Encryptor :: < aes:: Aes256 > :: new ( const6. into ( ) , iv. into ( ) ) ; // $ Sink
80+ let const6 = & [ 0u8 ; 32 ] ; // $ MISSING: Alert[rust/hard-coded-cryptographic-value]
81+ let aes_cipher6 = cfb_mode:: Encryptor :: < aes:: Aes256 > :: new ( const6. into ( ) , iv. into ( ) ) ; // $ MISSING: Sink
8282 _ = aes_cipher6. encrypt_b2b ( input, output) . unwrap ( ) ;
8383
84- let const7 = & [ 0u8 ; 16 ] ; // $ Alert[rust/hard-coded-cryptographic-value]
85- let aes_cipher7 = cfb_mode:: Encryptor :: < aes:: Aes256 > :: new ( key. into ( ) , const7. into ( ) ) ; // $ Sink
84+ let const7 = & [ 0u8 ; 16 ] ; // $ MISSING: Alert[rust/hard-coded-cryptographic-value]
85+ let aes_cipher7 = cfb_mode:: Encryptor :: < aes:: Aes256 > :: new ( key. into ( ) , const7. into ( ) ) ; // $ MISSING: Sink
8686 _ = aes_cipher7. encrypt_b2b ( input, output) . unwrap ( ) ;
8787
8888 // various string conversions
@@ -121,16 +121,16 @@ fn test_aes_gcm(
121121 let cipher1 = Aes256Gcm :: new ( & key1) ;
122122 let _ = cipher1. encrypt ( & nonce1, b"plaintext" . as_ref ( ) ) . unwrap ( ) ;
123123
124- let key2: [ u8 ; 32 ] = [ 0 ; 32 ] ; // $ Alert[rust/hard-coded-cryptographic-value]
125- let nonce2 = [ 0 ; 12 ] ; // $ Alert[rust/hard-coded-cryptographic-value]
126- let cipher2 = Aes256Gcm :: new ( & key2. into ( ) ) ; // $ Sink
127- let _ = cipher2. encrypt ( & nonce2. into ( ) , b"plaintext" . as_ref ( ) ) . unwrap ( ) ; // $ Sink
124+ let key2: [ u8 ; 32 ] = [ 0 ; 32 ] ; // $ MISSING: Alert[rust/hard-coded-cryptographic-value]
125+ let nonce2 = [ 0 ; 12 ] ; // $ MISSING: Alert[rust/hard-coded-cryptographic-value]
126+ let cipher2 = Aes256Gcm :: new ( & key2. into ( ) ) ; // $ MISSING: Sink
127+ let _ = cipher2. encrypt ( & nonce2. into ( ) , b"plaintext" . as_ref ( ) ) . unwrap ( ) ; // $ MISSING: Sink
128128
129- let key3_array: & [ u8 ; 32 ] = & [ 0xff ; 32 ] ; // $ Alert[rust/hard-coded-cryptographic-value]
129+ let key3_array: & [ u8 ; 32 ] = & [ 0xff ; 32 ] ; // $ MISSING: Alert[rust/hard-coded-cryptographic-value]
130130 let key3 = Key :: < Aes256Gcm > :: from_slice ( key3_array) ;
131- let nonce3: [ u8 ; 12 ] = [ 0xff ; 12 ] ; // $ Alert[rust/hard-coded-cryptographic-value]
132- let cipher3 = Aes256Gcm :: new ( & key3) ; // $ Sink
133- let _ = cipher3. encrypt ( & nonce3. into ( ) , b"plaintext" . as_ref ( ) ) . unwrap ( ) ; // $ Sink
131+ let nonce3: [ u8 ; 12 ] = [ 0xff ; 12 ] ; // $ MISSING: Alert[rust/hard-coded-cryptographic-value]
132+ let cipher3 = Aes256Gcm :: new ( & key3) ; // $ MISSING: Sink
133+ let _ = cipher3. encrypt ( & nonce3. into ( ) , b"plaintext" . as_ref ( ) ) . unwrap ( ) ; // $ MISSING: Sink
134134
135135 // with barrier
136136
0 commit comments