use CompileTimeConstantExpr instead of StringLiteral

This commit is contained in:
Jami Cogswell
2022-10-27 17:11:07 -04:00
parent 65f7474110
commit f40eefce57
2 changed files with 41 additions and 1 deletions

View File

@@ -187,5 +187,7 @@ private module Symmetric {
/** An instance of a generator that specifies an encryption algorithm. */
abstract private class GeneratorAlgoSpec extends CryptoAlgoSpec {
/** Returns an uppercase string representing the algorithm name specified by this generator object. */
string getAlgoName() { result = this.getAlgoSpec().(StringLiteral).getValue().toUpperCase() }
string getAlgoName() {
result = this.getAlgoSpec().(CompileTimeConstantExpr).getStringValue().toUpperCase()
}
}