test_class.file: sdk/dslink/src/test/java/org/dsa/iot/dslink/handshake/RemoteKeyTest.java
test_class.identifier: RemoteKeyTest
test_case.body: @Test
      public void normalizationTest() {
          byte[] b = new byte[3];
          b = RemoteKey.normalize(b);
          Assert.assertEquals(32, b.length);
  
          b = new byte[40];
          b = RemoteKey.normalize(b);
          Assert.assertEquals(32, b.length);
  
          b = new byte[]{1, 2, 3};
          b = RemoteKey.normalize(b);
          Assert.assertEquals(1, b[29]);
          Assert.assertEquals(2, b[30]);
          Assert.assertEquals(3, b[31]);
  
          b = new byte[100];
          b[50] = 4;
          b[99] = 3;
          b[98] = 2;
          b[97] = 1;
          b = RemoteKey.normalize(b);
          Assert.assertEquals(1, b[29]);
          Assert.assertEquals(2, b[30]);
          Assert.assertEquals(3, b[31]);
          Assert.assertFalse(Arrays.contains(toIntArray(b), 4));
      }
test_case.class_method_signature: RemoteKeyTest.normalizationTest()
test_case.full_signature: @Test public void normalizationTest()
test_case.identifier: normalizationTest
test_case.invocations: normalize assertEquals normalize assertEquals normalize assertEquals assertEquals assertEquals normalize assertEquals assertEquals assertEquals assertFalse contains toIntArray
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void normalizationTest()
focal_class.declarator: sharedSecret
focal_class.modifier: private final
focal_class.original_string: private final byte[] sharedSecret;
focal_class.type: byte[]
focal_class.var_name: sharedSecret
focal_class.file: sdk/dslink/src/main/java/org/dsa/iot/dslink/handshake/RemoteKey.java
focal_class.identifier: RemoteKey
focal_class.class_method_signature: RemoteKey.RemoteKey(byte[] sharedSecret)
focal_class.full_signature: private  RemoteKey(byte[] sharedSecret)
focal_class.identifier: RemoteKey
focal_class.modifiers: private
focal_class.parameters: (byte[] sharedSecret)
focal_class.signature:  RemoteKey(byte[] sharedSecret)
focal_class.class_method_signature: RemoteKey.getSharedSecret()
focal_class.full_signature: public byte[] getSharedSecret()
focal_class.identifier: getSharedSecret
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: byte[]
focal_class.signature: byte[] getSharedSecret()
focal_class.class_method_signature: RemoteKey.generate(LocalKeys keys, String tempKey)
focal_class.full_signature: public static RemoteKey generate(LocalKeys keys, String tempKey)
focal_class.identifier: generate
focal_class.modifiers: public static
focal_class.parameters: (LocalKeys keys, String tempKey)
focal_class.return: RemoteKey
focal_class.signature: RemoteKey generate(LocalKeys keys, String tempKey)
focal_class.class_method_signature: RemoteKey.normalize(byte[] sharedSecret)
focal_class.full_signature: public static byte[] normalize(byte[] sharedSecret)
focal_class.identifier: normalize
focal_class.modifiers: public static
focal_class.parameters: (byte[] sharedSecret)
focal_class.return: byte[]
focal_class.signature: byte[] normalize(byte[] sharedSecret)
focal_method.body: public static byte[] normalize(byte[] sharedSecret) {
          if (sharedSecret.length < 32) {
              byte[] fixed = new byte[32];
              int len = sharedSecret.length;
              System.arraycopy(sharedSecret, 0, fixed, 32 - len, len);
              sharedSecret = fixed;
          } else if (sharedSecret.length > 32) {
              byte[] fixed = new byte[32];
              System.arraycopy(sharedSecret, sharedSecret.length - 32, fixed, 0, fixed.length);
              sharedSecret = fixed;
          }
          return sharedSecret;
      }
focal_method.class_method_signature: RemoteKey.normalize(byte[] sharedSecret)
focal_method.full_signature: public static byte[] normalize(byte[] sharedSecret)
focal_method.identifier: normalize
focal_method.invocations: arraycopy arraycopy
focal_method.modifiers: public static
focal_method.parameters: (byte[] sharedSecret)
focal_method.return: byte[]
focal_method.signature: byte[] normalize(byte[] sharedSecret)