org.spongycastle.util.Arrays.append()方法的使用及代码示例

x33g5p2x  于2022-01-16 转载在 其他  
字(3.0k)|赞(0)|评价(0)|浏览(107)

本文整理了Java中org.spongycastle.util.Arrays.append()方法的一些代码示例,展示了Arrays.append()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Arrays.append()方法的具体详情如下:
包路径:org.spongycastle.util.Arrays
类名称:Arrays
方法名:append

Arrays.append介绍

暂无

代码示例

代码示例来源:origin: com.madgag.spongycastle/bctls-jdk15on

private static short[] checkNameType(short[] nameTypesSeen, short nameType)
  {
    /*
     * RFC 6066 3. The ServerNameList MUST NOT contain more than one name of the same
     * name_type.
     */
    if (!NameType.isValid(nameType) || Arrays.contains(nameTypesSeen, nameType))
    {
      return null;
    }
    return Arrays.append(nameTypesSeen, nameType);
  }
}

代码示例来源:origin: com.madgag.spongycastle/core

public static byte[] createSupportedPointFormatsExtension(short[] ecPointFormats) throws IOException
{
  if (ecPointFormats == null || !Arrays.contains(ecPointFormats, ECPointFormat.uncompressed))
  {
    /*
     * RFC 4492 5.1. If the Supported Point Formats Extension is indeed sent, it MUST
     * contain the value 0 (uncompressed) as one of the items in the list of point formats.
     */
    // NOTE: We add it at the end (lowest preference)
    ecPointFormats = Arrays.append(ecPointFormats, ECPointFormat.uncompressed);
  }
  return TlsUtils.encodeUint8ArrayWithUint8Length(ecPointFormats);
}

代码示例来源:origin: com.madgag.spongycastle/bctls-jdk15on

public static byte[] createSupportedPointFormatsExtension(short[] ecPointFormats) throws IOException
{
  if (ecPointFormats == null || !Arrays.contains(ecPointFormats, ECPointFormat.uncompressed))
  {
    /*
     * RFC 4492 5.1. If the Supported Point Formats Extension is indeed sent, it MUST
     * contain the value 0 (uncompressed) as one of the items in the list of point formats.
     */
    // NOTE: We add it at the end (lowest preference)
    ecPointFormats = Arrays.append(ecPointFormats, ECPointFormat.uncompressed);
  }
  return TlsUtils.encodeUint8ArrayWithUint8Length(ecPointFormats);
}

代码示例来源:origin: com.madgag.spongycastle/core

private static short[] checkNameType(short[] nameTypesSeen, short nameType)
  {
    /*
     * RFC 6066 3. The ServerNameList MUST NOT contain more than one name of the same
     * name_type.
     */
    if (!NameType.isValid(nameType) || Arrays.contains(nameTypesSeen, nameType))
    {
      return null;
    }
    return Arrays.append(nameTypesSeen, nameType);
  }
}

代码示例来源:origin: com.madgag.spongycastle/core

state.offeredCipherSuites = Arrays.append(state.offeredCipherSuites, CipherSuite.TLS_EMPTY_RENEGOTIATION_INFO_SCSV);
state.offeredCipherSuites = Arrays.append(state.offeredCipherSuites, CipherSuite.TLS_FALLBACK_SCSV);

代码示例来源:origin: com.madgag.spongycastle/bctls-jdk15on

state.offeredCipherSuites = Arrays.append(state.offeredCipherSuites, CipherSuite.TLS_EMPTY_RENEGOTIATION_INFO_SCSV);
state.offeredCipherSuites = Arrays.append(state.offeredCipherSuites, CipherSuite.TLS_FALLBACK_SCSV);

代码示例来源:origin: com.madgag.spongycastle/core

this.offeredCipherSuites = Arrays.append(offeredCipherSuites, CipherSuite.TLS_EMPTY_RENEGOTIATION_INFO_SCSV);
this.offeredCipherSuites = Arrays.append(offeredCipherSuites, CipherSuite.TLS_FALLBACK_SCSV);

代码示例来源:origin: com.madgag.spongycastle/bctls-jdk15on

this.offeredCipherSuites = Arrays.append(offeredCipherSuites, CipherSuite.TLS_EMPTY_RENEGOTIATION_INFO_SCSV);
this.offeredCipherSuites = Arrays.append(offeredCipherSuites, CipherSuite.TLS_FALLBACK_SCSV);

相关文章