mirror of
https://github.com/github/codeql.git
synced 2025-12-22 03:36:30 +01:00
ConceptsShared: Add BlockMode#matchesString(string) predicate
This commit is contained in:
@@ -91,6 +91,10 @@ module Cryptography {
|
|||||||
|
|
||||||
/** Holds if this block mode is considered to be insecure. */
|
/** Holds if this block mode is considered to be insecure. */
|
||||||
predicate isWeak() { this = "ECB" }
|
predicate isWeak() { this = "ECB" }
|
||||||
|
|
||||||
|
/** Holds if the given string appears to match this block mode. */
|
||||||
|
bindingset[s]
|
||||||
|
predicate matchesString(string s) { s.toUpperCase().matches("%" + this + "%") }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -91,6 +91,10 @@ module Cryptography {
|
|||||||
|
|
||||||
/** Holds if this block mode is considered to be insecure. */
|
/** Holds if this block mode is considered to be insecure. */
|
||||||
predicate isWeak() { this = "ECB" }
|
predicate isWeak() { this = "ECB" }
|
||||||
|
|
||||||
|
/** Holds if the given string appears to match this block mode. */
|
||||||
|
bindingset[s]
|
||||||
|
predicate matchesString(string s) { s.toUpperCase().matches("%" + this + "%") }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -91,6 +91,10 @@ module Cryptography {
|
|||||||
|
|
||||||
/** Holds if this block mode is considered to be insecure. */
|
/** Holds if this block mode is considered to be insecure. */
|
||||||
predicate isWeak() { this = "ECB" }
|
predicate isWeak() { this = "ECB" }
|
||||||
|
|
||||||
|
/** Holds if the given string appears to match this block mode. */
|
||||||
|
bindingset[s]
|
||||||
|
predicate matchesString(string s) { s.toUpperCase().matches("%" + this + "%") }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user