public class VirgilCard extends Object
| Modifier and Type | Method and Description |
|---|---|
static VirgilCard |
create(CreateCardRequest request)
Creates a new VirgilCard by request.
|
byte[] |
encrypt(byte[] data)
Encrypts the specified data for current VirgilCard
recipient.
|
byte[] |
encryptText(String text)
Encrypts the text.
|
static VirgilCards |
find(List<String> identities,
String type)
Finds the VirgilCards by specified criteria.
|
static VirgilCards |
find(String identity,
String type)
Finds the VirgilCards by specified criteria.
|
static VirgilCards |
findGlobal(List<String> identities)
Finds the VirgilCards in global scope by specified criteria.
|
static VirgilCards |
findGlobal(List<String> identities,
GlobalIdentityType type)
Finds the VirgilCards in global scope by specified criteria.
|
static VirgilCards |
findGlobal(String identity)
Finds the VirgilCards in global scope by specified criteria.
|
static VirgilCards |
findGlobal(String identity,
GlobalIdentityType type)
Finds the VirgilCards in global scope by specified criteria.
|
static VirgilCard |
get(String cardId)
Gets the
VirgilCard by specified identifier. |
Map<String,String> |
getData()
Gets the custom parameters.
|
String |
getId()
Gets the unique identifier for the Virgil Card.
|
String |
getIdentity()
Gets the value of current Virgil Card identity.
|
String |
getIdentityType()
Gets the type of current Virgil Card identity.
|
byte[] |
getPublicKey()
Gets the Public Key of current Virgil Card.
|
static void |
revoke(RevokeCardRequest request)
Revokes a VirgilCard by revocation request.
|
boolean |
verify(byte[] data,
byte[] signature)
Verifies the specified data and signature with current
VirgilCard recipient.
|
boolean |
verifyText(String text,
byte[] signature)
Verifies that a digital signature is valid for specified text.
|
public byte[] encrypt(byte[] data)
data - the data to be encrypted.public boolean verify(byte[] data,
byte[] signature)
data - The data to be verified.signature - The signature used to verify the data integrity.true if verification successed.public static VirgilCard get(String cardId)
VirgilCard by specified identifier.cardId - The identifier that represents a VirgilCard.public static VirgilCards findGlobal(String identity)
identity - The identity.public static VirgilCards findGlobal(String identity, GlobalIdentityType type)
identity - The identity.type - Type of the identity.public static VirgilCards findGlobal(List<String> identities)
identities - The identities.public static VirgilCards findGlobal(List<String> identities, GlobalIdentityType type)
identities - The identities.type - Type of the identity.public static VirgilCards find(String identity, String type)
identity - The identity.type - Type of the identity.public static VirgilCards find(List<String> identities, String type)
identities - The identities.type - Type of the identity.public static VirgilCard create(CreateCardRequest request)
request - The request.public static void revoke(RevokeCardRequest request)
request - The request.public byte[] encryptText(String text)
text - The text to encrypt.EmptyArgumentExceptionpublic boolean verifyText(String text, byte[] signature)
text - The text to encrypt.signature - The signature.true if the signature is valid; otherwise, false.public String getId()
public String getIdentity()
public String getIdentityType()
public Map<String,String> getData()
public byte[] getPublicKey()
Copyright © 2016. All rights reserved.