本文整理了Java中org.bouncycastle.util.Arrays.areEqual()
方法的一些代码示例,展示了Arrays.areEqual()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Arrays.areEqual()
方法的具体详情如下:
包路径:org.bouncycastle.util.Arrays
类名称:Arrays
方法名:areEqual
暂无
代码示例来源:origin: spring-projects/spring-security
private void generatesDifferentCipherTexts(BytesEncryptor bcEncryptor) {
byte[] encrypted1 = bcEncryptor.encrypt(testData);
byte[] encrypted2 = bcEncryptor.encrypt(testData);
Assert.assertFalse(Arrays.areEqual(encrypted1, encrypted2));
byte[] decrypted1 = bcEncryptor.decrypt(encrypted1);
byte[] decrypted2 = bcEncryptor.decrypt(encrypted2);
Assert.assertArrayEquals(testData, decrypted1);
Assert.assertArrayEquals(testData, decrypted2);
}
代码示例来源:origin: org.bouncycastle/bcprov-debug-jdk15on
boolean asn1Equals(
ASN1Primitive o)
{
if (!(o instanceof ASN1Integer))
{
return false;
}
ASN1Integer other = (ASN1Integer)o;
return Arrays.areEqual(bytes, other.bytes);
}
代码示例来源:origin: org.bouncycastle/bcprov-debug-jdk15on
boolean asn1Equals(
ASN1Primitive o)
{
if (!(o instanceof ASN1UTCTime))
{
return false;
}
return Arrays.areEqual(time, ((ASN1UTCTime)o).time);
}
代码示例来源:origin: org.bouncycastle/bcprov-debug-jdk15on
public boolean equals(Object o)
{
if (o instanceof OidHandle)
{
return Arrays.areEqual(enc, ((OidHandle)o).enc);
}
return false;
}
}
代码示例来源:origin: org.bouncycastle/bcprov-debug-jdk15on
boolean asn1Equals(
ASN1Primitive o)
{
if (!(o instanceof DERPrintableString))
{
return false;
}
DERPrintableString s = (DERPrintableString)o;
return Arrays.areEqual(string, s.string);
}
代码示例来源:origin: org.bouncycastle/bcprov-debug-jdk15on
public boolean equals(Object o)
{
if (!(o instanceof PackedDate))
{
return false;
}
PackedDate other = (PackedDate)o;
return Arrays.areEqual(time, other.time);
}
代码示例来源:origin: org.bouncycastle/bcprov-debug-jdk15on
boolean asn1Equals(
ASN1Primitive o)
{
if (!(o instanceof DERIA5String))
{
return false;
}
DERIA5String s = (DERIA5String)o;
return Arrays.areEqual(string, s.string);
}
代码示例来源:origin: org.bouncycastle/bcprov-debug-jdk15on
boolean asn1Equals(
ASN1Primitive o)
{
if (!(o instanceof ASN1GeneralizedTime))
{
return false;
}
return Arrays.areEqual(time, ((ASN1GeneralizedTime)o).time);
}
代码示例来源:origin: org.bouncycastle/bcprov-debug-jdk15on
boolean asn1Equals(ASN1Primitive o)
{
if (!(o instanceof DERUTF8String))
{
return false;
}
DERUTF8String s = (DERUTF8String)o;
return Arrays.areEqual(string, s.string);
}
代码示例来源:origin: org.bouncycastle/bcprov-debug-jdk15on
boolean asn1Equals(
ASN1Primitive o)
{
if (!(o instanceof DERT61String))
{
return false;
}
return Arrays.areEqual(string, ((DERT61String)o).string);
}
代码示例来源:origin: org.bouncycastle/bcprov-debug-jdk15on
protected boolean asn1Equals(
ASN1Primitive o)
{
if (!(o instanceof DERBMPString))
{
return false;
}
DERBMPString s = (DERBMPString)o;
return Arrays.areEqual(string, s.string);
}
代码示例来源:origin: org.bouncycastle/bcprov-debug-jdk15on
boolean asn1Equals(
ASN1Primitive o)
{
if (!(o instanceof DERVisibleString))
{
return false;
}
return Arrays.areEqual(string, ((DERVisibleString)o).string);
}
代码示例来源:origin: org.bouncycastle/bcprov-debug-jdk15on
boolean asn1Equals(
ASN1Primitive o)
{
if (!(o instanceof DERUniversalString))
{
return false;
}
return Arrays.areEqual(string, ((DERUniversalString)o).string);
}
代码示例来源:origin: org.bouncycastle/bcprov-debug-jdk15on
boolean asn1Equals(
ASN1Primitive o)
{
if (!(o instanceof DERGraphicString))
{
return false;
}
DERGraphicString s = (DERGraphicString)o;
return Arrays.areEqual(string, s.string);
}
代码示例来源:origin: redfish64/TinyTravelTracker
protected boolean areEqual(
byte[] a,
byte[] b)
{
return Arrays.areEqual(a, b);
}
代码示例来源:origin: redfish64/TinyTravelTracker
protected boolean asn1Equals(
ASN1Primitive o)
{
if (!(o instanceof DERBitString))
{
return false;
}
DERBitString other = (DERBitString)o;
return this.padBits == other.padBits
&& Arrays.areEqual(this.data, other.data);
}
代码示例来源:origin: redfish64/TinyTravelTracker
boolean asn1Equals(
ASN1Primitive o)
{
if (!(o instanceof DERApplicationSpecific))
{
return false;
}
DERApplicationSpecific other = (DERApplicationSpecific)o;
return isConstructed == other.isConstructed
&& tag == other.tag
&& Arrays.areEqual(octets, other.octets);
}
代码示例来源:origin: redfish64/TinyTravelTracker
boolean asn1Equals(
ASN1Primitive o)
{
if (!(o instanceof ASN1Enumerated))
{
return false;
}
ASN1Enumerated other = (ASN1Enumerated)o;
return Arrays.areEqual(this.bytes, other.bytes);
}
代码示例来源:origin: horrorho/InflatableDonkey
static void checkPublicExportData(byte[] publicExportData, Optional<PublicKeyInfo> publicKeyInfo) {
if (publicKeyInfo.isPresent()) {
byte[] publicInfoExportedKeyData = publicKeyInfo.get().key();
if (Arrays.areEqual(publicExportData, publicInfoExportedKeyData)) {
logger.debug("-- checkPublicExportData() - public export data match: {}",
Hex.toHexString(publicExportData));
} else {
logger.warn("-- checkPublicExportData() - public export data mismatch, supplied: {}, public key info: {}",
Hex.toHexString(publicExportData), Hex.toHexString(publicInfoExportedKeyData));
}
}
}
代码示例来源:origin: horrorho/InflatableDonkey
static boolean testSignature(Digest digest, byte[] signature) {
byte[] out = signature(digest);
boolean match = Arrays.areEqual(out, signature);
if (match) {
logger.debug("-- testSignature() - positive match out: 0x{} target: 0x{}",
Hex.toHexString(out), Hex.toHexString(signature));
} else {
logger.warn("-- testSignature() - negative match out: 0x{} target: 0x{}",
Hex.toHexString(out), Hex.toHexString(signature));
}
return match;
}
内容来源于网络,如有侵权,请联系作者删除!