File tree Expand file tree Collapse file tree
javascript/ql/lib/semmle/javascript/internal
python/ql/lib/semmle/python/internal
ruby/ql/lib/codeql/ruby/internal Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -91,6 +91,10 @@ module Cryptography {
9191
9292 /** Holds if this block mode is considered to be insecure. */
9393 predicate isWeak ( ) { this = "ECB" }
94+
95+ /** Holds if the given string appears to match this block mode. */
96+ bindingset [ s]
97+ predicate matchesString ( string s ) { s .toUpperCase ( ) .matches ( "%" + this + "%" ) }
9498 }
9599}
96100
Original file line number Diff line number Diff line change @@ -91,6 +91,10 @@ module Cryptography {
9191
9292 /** Holds if this block mode is considered to be insecure. */
9393 predicate isWeak ( ) { this = "ECB" }
94+
95+ /** Holds if the given string appears to match this block mode. */
96+ bindingset [ s]
97+ predicate matchesString ( string s ) { s .toUpperCase ( ) .matches ( "%" + this + "%" ) }
9498 }
9599}
96100
Original file line number Diff line number Diff line change @@ -91,6 +91,10 @@ module Cryptography {
9191
9292 /** Holds if this block mode is considered to be insecure. */
9393 predicate isWeak ( ) { this = "ECB" }
94+
95+ /** Holds if the given string appears to match this block mode. */
96+ bindingset [ s]
97+ predicate matchesString ( string s ) { s .toUpperCase ( ) .matches ( "%" + this + "%" ) }
9498 }
9599}
96100
You can’t perform that action at this time.
0 commit comments