@@ -42,9 +42,9 @@ fn test_stream_cipher_rabbit(
42
42
let mut rabbit_cipher8 = RabbitKeyOnly :: new ( rabbit:: Key :: from_slice ( const8) ) ; // $ Sink
43
43
rabbit_cipher8. apply_keystream ( & mut data) ;
44
44
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]
46
46
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
48
48
rabbit_cipher9. apply_keystream ( & mut data) ;
49
49
50
50
let const10: [ u8 ; 16 ] = unsafe { std:: mem:: zeroed ( ) } ; // $ Alert[rust/hard-coded-cryptographic-value]
@@ -63,8 +63,8 @@ fn test_block_cipher_aes(
63
63
let aes_cipher1 = Aes256 :: new ( key256. into ( ) ) ;
64
64
aes_cipher1. encrypt_block ( block128. into ( ) ) ;
65
65
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
68
68
aes_cipher2. encrypt_block ( block128. into ( ) ) ;
69
69
70
70
let aes_cipher3 = Aes256 :: new_from_slice ( key256) . unwrap ( ) ;
@@ -77,12 +77,12 @@ fn test_block_cipher_aes(
77
77
let aes_cipher5 = cfb_mode:: Encryptor :: < aes:: Aes256 > :: new ( key. into ( ) , iv. into ( ) ) ;
78
78
_ = aes_cipher5. encrypt_b2b ( input, output) . unwrap ( ) ;
79
79
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
82
82
_ = aes_cipher6. encrypt_b2b ( input, output) . unwrap ( ) ;
83
83
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
86
86
_ = aes_cipher7. encrypt_b2b ( input, output) . unwrap ( ) ;
87
87
88
88
// various string conversions
@@ -121,16 +121,16 @@ fn test_aes_gcm(
121
121
let cipher1 = Aes256Gcm :: new ( & key1) ;
122
122
let _ = cipher1. encrypt ( & nonce1, b"plaintext" . as_ref ( ) ) . unwrap ( ) ;
123
123
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
128
128
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]
130
130
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
134
134
135
135
// with barrier
136
136
0 commit comments