File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed
csharp/ql/lib/semmle/code/csharp/security/cryptography Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -58,15 +58,15 @@ module HardcodedSymmetricEncryptionKey {
58
58
}
59
59
60
60
private class SymmetricAlgorithmCreateEncryptorSink extends Sink {
61
- SymmetricAlgorithmCreateEncryptorSink ( ) { sinkNode ( this , "encryption-encryptor" ) }
61
+ private string kind ;
62
62
63
- override string getDescription ( ) { result = "Encryptor(rgbKey, IV)" }
64
- }
65
-
66
- private class SymmetricAlgorithmCreateDecryptorSink extends Sink {
67
- SymmetricAlgorithmCreateDecryptorSink ( ) { sinkNode ( this , "encryption-decryptor" ) }
63
+ SymmetricAlgorithmCreateEncryptorSink ( ) { sinkNode ( this , kind ) and kind .matches ( "encryption%" ) }
68
64
69
- override string getDescription ( ) { result = "Decryptor(rgbKey, IV)" }
65
+ override string getDescription ( ) {
66
+ kind = "encryption-encryptor" and result = "Encryptor(rgbKey, IV)"
67
+ or
68
+ kind = "encryption-decryptor" and result = "Decryptor(rgbKey, IV)"
69
+ }
70
70
}
71
71
72
72
private class CreateSymmetricKeySink extends Sink {
You can’t perform that action at this time.
0 commit comments