File tree Expand file tree Collapse file tree
shared/cryptography/codeql/cryptography Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1031,8 +1031,29 @@ module CryptographyBase<LocationSig Location, InputSig<Location> Input> {
10311031 * This operation takes an input message of arbitrary content and length and produces a fixed-size
10321032 * hash value as the output using a specified hashing algorithm.
10331033 */
1034- abstract class HashOperationNode extends OperationNode , THashOperation {
1035- abstract HashAlgorithmNode getAlgorithm ( ) ;
1034+ class HashOperationNode extends OperationNode , THashOperation {
1035+ HashAlgorithmInstance instance ;
1036+
1037+ HashOperationNode ( ) { this = THashOperation ( instance ) }
1038+
1039+ override string getInternalType ( ) { result = "HashOperation" }
1040+
1041+ override LocatableElement asElement ( ) { result = instance }
1042+
1043+ /**
1044+ * Gets the algorithm or unknown source nodes consumed as an algorithm associated with this operation.
1045+ */
1046+ NodeBase getACipherAlgorithmOrUnknown ( ) {
1047+ result = this .getAKnownCipherAlgorithm ( ) or
1048+ result = this .asElement ( ) .( OperationElement ) .getAlgorithmConsumer ( ) .getAnUnknownSourceNode ( )
1049+ }
1050+
1051+ /**
1052+ * Gets a known algorithm associated with this operation
1053+ */
1054+ HashAlgorithmNode getAKnownCipherAlgorithm ( ) {
1055+ result = this .asElement ( ) .( OperationElement ) .getAlgorithmConsumer ( ) .getAKnownSourceNode ( )
1056+ }
10361057 }
10371058
10381059 newtype THashType =
You can’t perform that action at this time.
0 commit comments