File tree Expand file tree Collapse file tree
csharp/ql/lib/semmle/code/csharp/security/cryptography Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -58,15 +58,15 @@ module HardcodedSymmetricEncryptionKey {
5858 }
5959
6060 private class SymmetricAlgorithmCreateEncryptorSink extends Sink {
61- SymmetricAlgorithmCreateEncryptorSink ( ) { sinkNode ( this , "encryption-encryptor" ) }
61+ private string kind ;
6262
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%" ) }
6864
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+ }
7070 }
7171
7272 private class CreateSymmetricKeySink extends Sink {
You can’t perform that action at this time.
0 commit comments