当前位置: 首页>>代码示例>>Java>>正文


Java Arrays.areEqual方法代码示例

本文整理汇总了Java中org.bouncycastle.util.Arrays.areEqual方法的典型用法代码示例。如果您正苦于以下问题:Java Arrays.areEqual方法的具体用法?Java Arrays.areEqual怎么用?Java Arrays.areEqual使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.bouncycastle.util.Arrays的用法示例。


在下文中一共展示了Arrays.areEqual方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: equals

import org.bouncycastle.util.Arrays; //导入方法依赖的package包/类
public boolean equals(
    Object o)
{
    if (!(o instanceof DHValidationParameters))
    {
        return false;
    }

    DHValidationParameters  other = (DHValidationParameters)o;

    if (other.counter != this.counter)
    {
        return false;
    }

    return Arrays.areEqual(this.seed, other.seed);
}
 
开发者ID:PhilippC,项目名称:keepass2android,代码行数:18,代码来源:DHValidationParameters.java

示例2: equals

import org.bouncycastle.util.Arrays; //导入方法依赖的package包/类
public boolean equals(
    Object o)
{
    if (!(o instanceof DSAValidationParameters))
    {
        return false;
    }

    DSAValidationParameters  other = (DSAValidationParameters)o;

    if (other.counter != this.counter)
    {
        return false;
    }

    return Arrays.areEqual(this.seed, other.seed);
}
 
开发者ID:PhilippC,项目名称:keepass2android,代码行数:18,代码来源:DSAValidationParameters.java

示例3: equals

import org.bouncycastle.util.Arrays; //导入方法依赖的package包/类
public boolean equals(
    Object o)
{
    if (o == this)
    {
        return true;
    }

    if (!(o instanceof CertId))
    {
        return false;
    }

    CertId cId = (CertId)o;

    return Arrays.areEqual(id, cId.id);
}
 
开发者ID:Appdome,项目名称:ipack,代码行数:18,代码来源:PKCS12KeyStoreSpi.java

示例4: isIPConstrained

import org.bouncycastle.util.Arrays; //导入方法依赖的package包/类
/**
 * Checks if the IP address <code>ip</code> is constrained by
 * <code>constraint</code>.
 *
 * @param ip         The IP address.
 * @param constraint The constraint. This is an IP address concatenated with
 *                   its subnetmask.
 * @return <code>true</code> if constrained, <code>false</code>
 *         otherwise.
 */
private boolean isIPConstrained(byte ip[], byte[] constraint)
{
    int ipLength = ip.length;

    if (ipLength != (constraint.length / 2))
    {
        return false;
    }

    byte[] subnetMask = new byte[ipLength];
    System.arraycopy(constraint, ipLength, subnetMask, 0, ipLength);

    byte[] permittedSubnetAddress = new byte[ipLength];

    byte[] ipSubnetAddress = new byte[ipLength];

    // the resulting IP address by applying the subnet mask
    for (int i = 0; i < ipLength; i++)
    {
        permittedSubnetAddress[i] = (byte)(constraint[i] & subnetMask[i]);
        ipSubnetAddress[i] = (byte)(ip[i] & subnetMask[i]);
    }

    return Arrays.areEqual(permittedSubnetAddress, ipSubnetAddress);
}
 
开发者ID:Appdome,项目名称:ipack,代码行数:36,代码来源:PKIXNameConstraintValidator.java

示例5: asn1Equals

import org.bouncycastle.util.Arrays; //导入方法依赖的package包/类
boolean asn1Equals(
    ASN1Primitive o)
{
    if (!(o instanceof ASN1OctetString))
    {
        return false;
    }

    ASN1OctetString  other = (ASN1OctetString)o;

    return Arrays.areEqual(string, other.string);
}
 
开发者ID:Appdome,项目名称:ipack,代码行数:13,代码来源:ASN1OctetString.java

示例6: asn1Equals

import org.bouncycastle.util.Arrays; //导入方法依赖的package包/类
protected boolean asn1Equals(
    DERObject  o)
{
    if (!(o instanceof DERBitString))
    {
        return false;
    }

    DERBitString other = (DERBitString)o;

    return this.padBits == other.padBits
        && Arrays.areEqual(this.data, other.data);
}
 
开发者ID:PhilippC,项目名称:keepass2android,代码行数:14,代码来源:DERBitString.java

示例7: asn1Equals

import org.bouncycastle.util.Arrays; //导入方法依赖的package包/类
boolean asn1Equals(
    DERObject  o)
{
    if (!(o instanceof DERInteger))
    {
        return false;
    }

    DERInteger other = (DERInteger)o;

    return Arrays.areEqual(bytes, other.bytes);
}
 
开发者ID:PhilippC,项目名称:keepass2android,代码行数:13,代码来源:DERInteger.java

示例8: asn1Equals

import org.bouncycastle.util.Arrays; //导入方法依赖的package包/类
boolean asn1Equals(
    ASN1Primitive o)
{
    if (!(o instanceof DERNumericString))
    {
        return false;
    }

    DERNumericString  s = (DERNumericString)o;

    return Arrays.areEqual(string, s.string);
}
 
开发者ID:Appdome,项目名称:ipack,代码行数:13,代码来源:DERNumericString.java

示例9: asn1Equals

import org.bouncycastle.util.Arrays; //导入方法依赖的package包/类
boolean asn1Equals(
    ASN1Primitive o)
{
    if (!(o instanceof DERPrintableString))
    {
        return false;
    }

    DERPrintableString  s = (DERPrintableString)o;

    return Arrays.areEqual(string, s.string);
}
 
开发者ID:Appdome,项目名称:ipack,代码行数:13,代码来源:DERPrintableString.java

示例10: equals

import org.bouncycastle.util.Arrays; //导入方法依赖的package包/类
public boolean equals(Object obj)
{
    if (this == obj)
    {
        return true;
    }
    if (obj == null)
    {
        return false;
    }
    if (getClass() != obj.getClass())
    {
        return false;
    }
    SparseTernaryPolynomial other = (SparseTernaryPolynomial)obj;
    if (N != other.N)
    {
        return false;
    }
    if (!Arrays.areEqual(negOnes, other.negOnes))
    {
        return false;
    }
    if (!Arrays.areEqual(ones, other.ones))
    {
        return false;
    }
    return true;
}
 
开发者ID:Appdome,项目名称:ipack,代码行数:30,代码来源:SparseTernaryPolynomial.java

示例11: asn1Equals

import org.bouncycastle.util.Arrays; //导入方法依赖的package包/类
boolean asn1Equals(
    ASN1Primitive o)
{
    if (!(o instanceof DERT61UTF8String))
    {
        return false;
    }

    return Arrays.areEqual(string, ((DERT61UTF8String)o).string);
}
 
开发者ID:Appdome,项目名称:ipack,代码行数:11,代码来源:DERT61UTF8String.java

示例12: equals

import org.bouncycastle.util.Arrays; //导入方法依赖的package包/类
public boolean equals(Object obj)
{
    if (obj instanceof LongPolynomial2)
    {
        return Arrays.areEqual(coeffs, ((LongPolynomial2)obj).coeffs);
    }
    else
    {
        return false;
    }
}
 
开发者ID:Appdome,项目名称:ipack,代码行数:12,代码来源:LongPolynomial2.java

示例13: asn1Equals

import org.bouncycastle.util.Arrays; //导入方法依赖的package包/类
boolean asn1Equals(ASN1Primitive o)
{
    if (!(o instanceof DERUTF8String))
    {
        return false;
    }

    DERUTF8String s = (DERUTF8String)o;

    return Arrays.areEqual(string, s.string);
}
 
开发者ID:Appdome,项目名称:ipack,代码行数:12,代码来源:DERUTF8String.java

示例14: asn1Equals

import org.bouncycastle.util.Arrays; //导入方法依赖的package包/类
boolean asn1Equals(
    ASN1Primitive  o)
{
    if (!(o instanceof DERInteger))
    {
        return false;
    }

    DERInteger other = (DERInteger)o;

    return Arrays.areEqual(bytes, other.bytes);
}
 
开发者ID:Appdome,项目名称:ipack,代码行数:13,代码来源:DERInteger.java

示例15: equals

import org.bouncycastle.util.Arrays; //导入方法依赖的package包/类
public boolean equals(Object obj)
{
    if (obj instanceof IntegerPolynomial)
    {
        return Arrays.areEqual(coeffs, ((IntegerPolynomial)obj).coeffs);
    }
    else
    {
        return false;
    }
}
 
开发者ID:Appdome,项目名称:ipack,代码行数:12,代码来源:IntegerPolynomial.java


注:本文中的org.bouncycastle.util.Arrays.areEqual方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。