public class VerificationHelpers extends Object
| Constructor and Description |
|---|
VerificationHelpers() |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
verifyDataDigest(Data data,
DigestAlgorithm digestAlgorithm)
Verify the Data packet using the digest algorithm.
|
static boolean |
verifyDataDigest(Data data,
DigestAlgorithm digestAlgorithm,
WireFormat wireFormat)
Verify the Data packet using the digest algorithm.
|
static boolean |
verifyDataSignature(Data data,
Blob publicKeyDer)
Verify the Data packet using the public key and digest algorithm SHA256.
|
static boolean |
verifyDataSignature(Data data,
Blob publicKeyDer,
DigestAlgorithm digestAlgorithm)
Verify the Data packet using the public key.
|
static boolean |
verifyDataSignature(Data data,
Blob publicKeyDer,
DigestAlgorithm digestAlgorithm,
WireFormat wireFormat)
Verify the Data packet using the public key.
|
static boolean |
verifyDataSignature(Data data,
CertificateV2 certificate)
Verify the Data packet using the public key in the certificate and digest
algorithm SHA256.
|
static boolean |
verifyDataSignature(Data data,
CertificateV2 certificate,
DigestAlgorithm digestAlgorithm)
Verify the Data packet using the public key in the certificate.
|
static boolean |
verifyDataSignature(Data data,
CertificateV2 certificate,
DigestAlgorithm digestAlgorithm,
WireFormat wireFormat)
Verify the Data packet using the public key in the certificate.
|
static boolean |
verifyDataSignature(Data data,
PublicKey publicKey)
Verify the Data packet using the public key and digest algorithm SHA256.
|
static boolean |
verifyDataSignature(Data data,
PublicKey publicKey,
DigestAlgorithm digestAlgorithm)
Verify the Data packet using the public key.
|
static boolean |
verifyDataSignature(Data data,
PublicKey publicKey,
DigestAlgorithm digestAlgorithm,
WireFormat wireFormat)
Verify the Data packet using the public key.
|
static boolean |
verifyDigest(Blob buffer,
Blob digest,
DigestAlgorithm digestAlgorithm)
Verify the buffer against the digest using the digest algorithm.
|
static boolean |
verifyDigest(ByteBuffer buffer,
Blob digest,
DigestAlgorithm digestAlgorithm)
Verify the buffer against the digest using the digest algorithm.
|
static boolean |
verifyDigest(ByteBuffer buffer,
byte[] digest,
DigestAlgorithm digestAlgorithm)
Verify the buffer against the digest using the digest algorithm.
|
static boolean |
verifyInterestDigest(Interest interest,
DigestAlgorithm digestAlgorithm)
Verify the Interest packet using the digest algorithm, where the last two
name components are the SignatureInfo and signature bytes.
|
static boolean |
verifyInterestDigest(Interest interest,
DigestAlgorithm digestAlgorithm,
WireFormat wireFormat)
Verify the Interest packet using the digest algorithm, where the last two
name components are the SignatureInfo and signature bytes.
|
static boolean |
verifyInterestSignature(Interest interest,
Blob publicKeyDer)
Verify the Interest packet using the public key and digest algorithm SHA256,
where the last two name components are the SignatureInfo and signature
bytes.
|
static boolean |
verifyInterestSignature(Interest interest,
Blob publicKeyDer,
DigestAlgorithm digestAlgorithm)
Verify the Interest packet using the public key, where the last two name
components are the SignatureInfo and signature bytes.
|
static boolean |
verifyInterestSignature(Interest interest,
Blob publicKeyDer,
DigestAlgorithm digestAlgorithm,
WireFormat wireFormat)
Verify the Interest packet using the public key, where the last two name
components are the SignatureInfo and signature bytes.
|
static boolean |
verifyInterestSignature(Interest interest,
CertificateV2 certificate)
Verify the Interest packet using the public key and digest algorithm SHA256
in the certificate, where the last two name components are the
SignatureInfo and signature bytes.
|
static boolean |
verifyInterestSignature(Interest interest,
CertificateV2 certificate,
DigestAlgorithm digestAlgorithm)
Verify the Interest packet using the public key in the certificate, where
the last two name components are the SignatureInfo and signature bytes.
|
static boolean |
verifyInterestSignature(Interest interest,
CertificateV2 certificate,
DigestAlgorithm digestAlgorithm,
WireFormat wireFormat)
Verify the Interest packet using the public key in the certificate, where
the last two name components are the SignatureInfo and signature bytes.
|
static boolean |
verifyInterestSignature(Interest interest,
PublicKey publicKey)
Verify the Interest packet using the public key and digest algorithm SHA256,
where the last two name components are the SignatureInfo and signature
bytes.
|
static boolean |
verifyInterestSignature(Interest interest,
PublicKey publicKey,
DigestAlgorithm digestAlgorithm)
Verify the Interest packet using the public key, where the last two name
components are the SignatureInfo and signature bytes.
|
static boolean |
verifyInterestSignature(Interest interest,
PublicKey publicKey,
DigestAlgorithm digestAlgorithm,
WireFormat wireFormat)
Verify the Interest packet using the public key, where the last two name
components are the SignatureInfo and signature bytes.
|
static boolean |
verifySignature(Blob buffer,
Blob signature,
Blob publicKeyDer)
Verify the buffer against the signature using the encoded public key and
digest algorithm SHA256.
|
static boolean |
verifySignature(Blob buffer,
Blob signature,
Blob publicKeyDer,
DigestAlgorithm digestAlgorithm)
Verify the buffer against the signature using the encoded public key.
|
static boolean |
verifySignature(Blob buffer,
Blob signature,
PublicKey publicKey)
Verify the buffer against the signature using the public key and
digest algorithm SHA256.
|
static boolean |
verifySignature(Blob buffer,
Blob signature,
PublicKey publicKey,
DigestAlgorithm digestAlgorithm)
Verify the buffer against the signature using the public key.
|
static boolean |
verifySignature(ByteBuffer buffer,
Blob signature,
Blob publicKeyDer)
Verify the buffer against the signature using the encoded public key and
digest algorithm SHA256.
|
static boolean |
verifySignature(ByteBuffer buffer,
Blob signature,
Blob publicKeyDer,
DigestAlgorithm digestAlgorithm)
Verify the buffer against the signature using the encoded public key.
|
static boolean |
verifySignature(ByteBuffer buffer,
Blob signature,
PublicKey publicKey)
Verify the buffer against the signature using the public key and
digest algorithm SHA256.
|
static boolean |
verifySignature(ByteBuffer buffer,
Blob signature,
PublicKey publicKey,
DigestAlgorithm digestAlgorithm)
Verify the buffer against the signature using the public key.
|
static boolean |
verifySignature(ByteBuffer buffer,
byte[] signature,
Blob publicKeyDer)
Verify the buffer against the signature using the encoded public key and
digest algorithm SHA256.
|
static boolean |
verifySignature(ByteBuffer buffer,
byte[] signature,
Blob publicKeyDer,
DigestAlgorithm digestAlgorithm)
Verify the buffer against the signature using the encoded public key.
|
static boolean |
verifySignature(ByteBuffer buffer,
byte[] signature,
PublicKey publicKey)
Verify the buffer against the signature using the public key and
digest algorithm SHA256.
|
static boolean |
verifySignature(ByteBuffer buffer,
byte[] signature,
PublicKey publicKey,
DigestAlgorithm digestAlgorithm)
Verify the buffer against the signature using the public key.
|
public static boolean verifySignature(ByteBuffer buffer, byte[] signature, PublicKey publicKey, DigestAlgorithm digestAlgorithm)
buffer - The input buffer to verify.signature - The signature bytes.publicKey - The object containing the public key.digestAlgorithm - The digest algorithm.IllegalArgumentException - for an invalid public key type or
digestAlgorithm.public static boolean verifySignature(ByteBuffer buffer, byte[] signature, PublicKey publicKey)
buffer - The input buffer to verify.signature - The signature bytes.publicKey - The object containing the public key.IllegalArgumentException - for an invalid public key type.public static boolean verifySignature(ByteBuffer buffer, Blob signature, PublicKey publicKey, DigestAlgorithm digestAlgorithm)
buffer - The input buffer to verify.signature - The signature bytes.publicKey - The object containing the public key.digestAlgorithm - The digest algorithm.IllegalArgumentException - for an invalid public key type or
digestAlgorithm.public static boolean verifySignature(ByteBuffer buffer, Blob signature, PublicKey publicKey)
buffer - The input buffer to verify.signature - The signature bytes.publicKey - The object containing the public key.IllegalArgumentException - for an invalid public key type.public static boolean verifySignature(Blob buffer, Blob signature, PublicKey publicKey, DigestAlgorithm digestAlgorithm)
buffer - The input buffer to verify.signature - The signature bytes.publicKey - The object containing the public key.digestAlgorithm - The digest algorithm.IllegalArgumentException - for an invalid public key type or
digestAlgorithm.public static boolean verifySignature(Blob buffer, Blob signature, PublicKey publicKey)
buffer - The input buffer to verify.signature - The signature bytes.publicKey - The object containing the public key.IllegalArgumentException - for an invalid public key type.public static boolean verifySignature(ByteBuffer buffer, byte[] signature, Blob publicKeyDer, DigestAlgorithm digestAlgorithm)
buffer - The input buffer to verify.signature - The signature bytes.publicKeyDer - The DER-encoded public key.digestAlgorithm - The digest algorithm.IllegalArgumentException - for an invalid keyType or digestAlgorithm.public static boolean verifySignature(ByteBuffer buffer, byte[] signature, Blob publicKeyDer)
buffer - The input buffer to verify.signature - The signature bytes.publicKeyDer - The DER-encoded public key.IllegalArgumentException - for an invalid keyType.public static boolean verifySignature(ByteBuffer buffer, Blob signature, Blob publicKeyDer, DigestAlgorithm digestAlgorithm)
buffer - The input buffer to verify.signature - The signature bytes.publicKeyDer - The DER-encoded public key.digestAlgorithm - The digest algorithm.IllegalArgumentException - for an invalid keyType or digestAlgorithm.public static boolean verifySignature(ByteBuffer buffer, Blob signature, Blob publicKeyDer)
buffer - The input buffer to verify.signature - The signature bytes.publicKeyDer - The DER-encoded public key.IllegalArgumentException - for an invalid keyType.public static boolean verifySignature(Blob buffer, Blob signature, Blob publicKeyDer, DigestAlgorithm digestAlgorithm)
buffer - The input buffer to verify.signature - The signature bytes.publicKeyDer - The DER-encoded public key.digestAlgorithm - The digest algorithm.IllegalArgumentException - for an invalid keyType or digestAlgorithm.public static boolean verifySignature(Blob buffer, Blob signature, Blob publicKeyDer)
buffer - The input buffer to verify.signature - The signature bytes.publicKeyDer - The DER-encoded public key.IllegalArgumentException - for an invalid keyType.public static boolean verifyDataSignature(Data data, PublicKey publicKey, DigestAlgorithm digestAlgorithm, WireFormat wireFormat)
data - The Data packet to verify.publicKey - The object containing the public key.digestAlgorithm - The digest algorithm.wireFormat - A WireFormat object used to encode the Data packet.IllegalArgumentException - for an invalid public key type or
digestAlgorithm.public static boolean verifyDataSignature(Data data, PublicKey publicKey, DigestAlgorithm digestAlgorithm)
data - The Data packet to verify.publicKey - The object containing the public key.digestAlgorithm - The digest algorithm.IllegalArgumentException - for an invalid public key type or
digestAlgorithm.public static boolean verifyDataSignature(Data data, PublicKey publicKey)
data - The Data packet to verify.publicKey - The object containing the public key.IllegalArgumentException - for an invalid public key type.public static boolean verifyDataSignature(Data data, Blob publicKeyDer, DigestAlgorithm digestAlgorithm, WireFormat wireFormat)
data - The Data packet to verify.publicKeyDer - The DER-encoded public key.digestAlgorithm - The digest algorithm.wireFormat - A WireFormat object used to encode the Data packet.IllegalArgumentException - for an invalid public key type or
digestAlgorithm.public static boolean verifyDataSignature(Data data, Blob publicKeyDer, DigestAlgorithm digestAlgorithm)
data - The Data packet to verify.publicKeyDer - The DER-encoded public key.digestAlgorithm - The digest algorithm.IllegalArgumentException - for an invalid public key type or
digestAlgorithm.public static boolean verifyDataSignature(Data data, Blob publicKeyDer)
data - The Data packet to verify.publicKeyDer - The DER-encoded public key.IllegalArgumentException - for an invalid public key type or
digestAlgorithm.public static boolean verifyDataSignature(Data data, CertificateV2 certificate, DigestAlgorithm digestAlgorithm, WireFormat wireFormat)
data - The Data packet to verify.certificate - The certificate containing the public key.digestAlgorithm - The digest algorithm.wireFormat - A WireFormat object used to encode the Data packet.IllegalArgumentException - for an invalid public key type or
digestAlgorithm.public static boolean verifyDataSignature(Data data, CertificateV2 certificate, DigestAlgorithm digestAlgorithm)
data - The Data packet to verify.certificate - The certificate containing the public key.digestAlgorithm - The digest algorithm.IllegalArgumentException - for an invalid public key type or
digestAlgorithm.public static boolean verifyDataSignature(Data data, CertificateV2 certificate)
data - The Data packet to verify.certificate - The certificate containing the public key.IllegalArgumentException - for an invalid public key type.public static boolean verifyInterestSignature(Interest interest, PublicKey publicKey, DigestAlgorithm digestAlgorithm, WireFormat wireFormat)
interest - The Interest packet to verify.publicKey - The object containing the public key.digestAlgorithm - The digest algorithm.wireFormat - A WireFormat object used to decode the Interest packet.IllegalArgumentException - for an invalid public key type or
digestAlgorithm.public static boolean verifyInterestSignature(Interest interest, PublicKey publicKey, DigestAlgorithm digestAlgorithm)
interest - The Interest packet to verify.publicKey - The object containing the public key.digestAlgorithm - The digest algorithm.IllegalArgumentException - for an invalid public key type or
digestAlgorithm.public static boolean verifyInterestSignature(Interest interest, PublicKey publicKey)
interest - The Interest packet to verify.publicKey - The object containing the public key.IllegalArgumentException - for an invalid public key type.public static boolean verifyInterestSignature(Interest interest, Blob publicKeyDer, DigestAlgorithm digestAlgorithm, WireFormat wireFormat)
interest - The Interest packet to verify.publicKeyDer - The DER-encoded public key.digestAlgorithm - The digest algorithm.wireFormat - A WireFormat object used to decode the Interest packet.IllegalArgumentException - for an invalid public key type or
digestAlgorithm.public static boolean verifyInterestSignature(Interest interest, Blob publicKeyDer, DigestAlgorithm digestAlgorithm)
interest - The Interest packet to verify.publicKeyDer - The DER-encoded public key.digestAlgorithm - The digest algorithm.IllegalArgumentException - for an invalid public key type or
digestAlgorithm.public static boolean verifyInterestSignature(Interest interest, Blob publicKeyDer)
interest - The Interest packet to verify.publicKeyDer - The DER-encoded public key.IllegalArgumentException - for an invalid public key type.public static boolean verifyInterestSignature(Interest interest, CertificateV2 certificate, DigestAlgorithm digestAlgorithm, WireFormat wireFormat)
interest - The Interest packet to verify.certificate - The certificate containing the public key.digestAlgorithm - (optional) The digest algorithm. If omitted, use SHA256.wireFormat - (optional) A WireFormat object used to decode the
Interest packet. If omitted, use WireFormat getDefaultWireFormat().IllegalArgumentException - for an invalid public key type or
digestAlgorithm.public static boolean verifyInterestSignature(Interest interest, CertificateV2 certificate, DigestAlgorithm digestAlgorithm)
interest - The Interest packet to verify.certificate - The certificate containing the public key.digestAlgorithm - (optional) The digest algorithm. If omitted, use SHA256.IllegalArgumentException - for an invalid public key type or
digestAlgorithm.public static boolean verifyInterestSignature(Interest interest, CertificateV2 certificate)
interest - The Interest packet to verify.certificate - The certificate containing the public key.IllegalArgumentException - for an invalid public key type.public static boolean verifyDigest(ByteBuffer buffer, byte[] digest, DigestAlgorithm digestAlgorithm)
buffer - The input buffer to verify.digest - The digest bytes.digestAlgorithm - The digest algorithm, such as DigestAlgorithm.SHA256.IllegalArgumentException - for an invalid digestAlgorithm.public static boolean verifyDigest(ByteBuffer buffer, Blob digest, DigestAlgorithm digestAlgorithm)
buffer - The input buffer to verify.digest - The digest bytes.digestAlgorithm - The digest algorithm, such as DigestAlgorithm.SHA256.IllegalArgumentException - for an invalid digestAlgorithm.public static boolean verifyDigest(Blob buffer, Blob digest, DigestAlgorithm digestAlgorithm)
buffer - The input buffer to verify.digest - The digest bytes.digestAlgorithm - The digest algorithm, such as DigestAlgorithm.SHA256.IllegalArgumentException - for an invalid digestAlgorithm.public static boolean verifyDataDigest(Data data, DigestAlgorithm digestAlgorithm, WireFormat wireFormat)
data - The Data packet to verify.digestAlgorithm - The digest algorithm, such as DigestAlgorithm.SHA256.wireFormat - A WireFormat object used to encode the Data packet.IllegalArgumentException - for an invalid digestAlgorithm.public static boolean verifyDataDigest(Data data, DigestAlgorithm digestAlgorithm)
data - The Data packet to verify.digestAlgorithm - The digest algorithm, such as DigestAlgorithm.SHA256.IllegalArgumentException - for an invalid digestAlgorithm.public static boolean verifyInterestDigest(Interest interest, DigestAlgorithm digestAlgorithm, WireFormat wireFormat)
interest - The Interest packet to verify.digestAlgorithm - The digest algorithm, such as DigestAlgorithm.SHA256.wireFormat - A WireFormat object used to decode the Interest packet.IllegalArgumentException - for an invalid digestAlgorithm.public static boolean verifyInterestDigest(Interest interest, DigestAlgorithm digestAlgorithm)
interest - The Interest packet to verify.digestAlgorithm - The digest algorithm, such as DigestAlgorithm.SHA256.IllegalArgumentException - for an invalid digestAlgorithm.Copyright © 2019. All rights reserved.