public static class DigitalSignature.WithKey extends DigitalSignature
A digital signature that identifies who the public key is owned by.
DigitalSignature.WithKey
OpaqueBytes.Companion
Companion
Constructor and Description |
---|
WithKey(java.security.PublicKey by,
byte[] bytes)
A digital signature that identifies who the public key is owned by.
|
Modifier and Type | Method and Description |
---|---|
java.security.PublicKey |
getBy() |
boolean |
isValid(byte[] content)
Utility to simplify the act of verifying a signature. In comparison to
DigitalSignature.WithKey.verify doesn't throw an
exception, making it more suitable where a boolean is required, but normally you should use the function
which throws, as it avoids the risk of failing to test the result. |
boolean |
verify(byte[] content)
Utility to simplify the act of verifying a signature.
|
boolean |
verify(OpaqueBytes content)
Utility to simplify the act of verifying a signature.
|
DigitalSignature |
withoutKey() |
getBytes
public WithKey(java.security.PublicKey by, byte[] bytes)
A digital signature that identifies who the public key is owned by.
public boolean verify(byte[] content)
Utility to simplify the act of verifying a signature.
public boolean verify(OpaqueBytes content)
Utility to simplify the act of verifying a signature.
public boolean isValid(byte[] content)
Utility to simplify the act of verifying a signature. In comparison to DigitalSignature.WithKey.verify
doesn't throw an
exception, making it more suitable where a boolean is required, but normally you should use the function
which throws, as it avoids the risk of failing to test the result.
DigitalSignature.WithKey.verify
public DigitalSignature withoutKey()
public java.security.PublicKey getBy()