Details

    • Type: Language-Specification
    • Status: Active
    • Resolution: Unresolved
    • Labels:
      None
    • Impact:
      Unknown 'null' severity
    • Likelihood:
      Unknown 'null' severity
    • Default Quality Profiles:
      Sonar way
    • Analysis Level:
      Syntactic Analysis

      Description

      Noncompliant Code Example

      val keyPairGen1 = KeyPairGenerator.getInstance("RSA")
      keyPairGen1.initialize(1024) // Noncompliant
      
      val keyPairGen5 = KeyPairGenerator.getInstance("EC")
      val ecSpec1 = ECGenParameterSpec("secp112r1") // Noncompliant
      keyPairGen5.initialize(ecSpec1)
      
      val keyGen1 = KeyGenerator.getInstance("AES")
      keyGen1.init(64) // Noncompliant
      

      Compliant Solution

      val keyPairGen6 = KeyPairGenerator.getInstance("RSA")
      keyPairGen6.initialize(2048) // Compliant
      
      val keyPairGen5 = KeyPairGenerator.getInstance("EC")
      val ecSpec1 = ECGenParameterSpec("secp224k1") // Noncompliant
      keyPairGen5.initialize(ecSpec1)
      
      val keyGen2 = KeyGenerator.getInstance("AES")
      keyGen2.init(128) // Compliant
      

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              eric.therond Eric Therond
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: