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

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

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

Arrays.append介绍

暂无

代码示例

代码示例来源:origin: org.bouncycastle/bcprov-debug-jdk15on

/**
 * Converts a character password to bytes incorporating the required trailing zero byte.
 *
 * @param password the password to be encoded.
 * @return a byte representation of the password in UTF8 + trailing zero.
 */
public static byte[] passwordToByteArray(char[] password)
{
  return Arrays.append(Strings.toUTF8ByteArray(password), (byte)0);
}

代码示例来源:origin: org.bouncycastle/bcprov-debug-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: org.bouncycastle/bcprov-debug-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: redfish64/TinyTravelTracker

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: redfish64/TinyTravelTracker

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

代码示例来源:origin: locationtech/geowave

String[] selectedColumns = getSelectedColumns(query);
if (MetadataType.STATS.equals(metadataType)) {
 selectedColumns = Arrays.append(selectedColumns, CassandraMetadataWriter.VISIBILITY_KEY);

代码示例来源:origin: org.bouncycastle/bcprov-debug-jdk15on

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

代码示例来源:origin: redfish64/TinyTravelTracker

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

代码示例来源:origin: org.bouncycastle/bcprov-debug-jdk15on

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

相关文章