|
||||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||
java.lang.Objectorg.eclipse.higgins.icard.provider.cardspace.common.utils.CardCryptography
| Constructor Summary | |
|---|---|
CardCryptography()
|
|
| Method Summary | |
|---|---|
static byte[] |
decodeBase64(String data)
Decodes String to byte array using Base64 |
static Document |
decrypt(InputStream is,
String password)
Performs decryption of CardSpace backup file (*.crds file format) and returns Document with RoamingStore root element |
static byte[] |
decryptPersonalCardField(byte[] encryptedData,
EncryptedMasterKey key)
|
static String |
encodeBase64(byte[] data,
int wrappedStringlen)
Encodes byte array to String using Base64 |
static void |
encrypt(Document cardsStore,
OutputStream os,
String password)
Performs encryption of CardSpace-interoperable ICards |
static byte[] |
encryptData(byte[] data,
byte[] initVector,
Key encryptionKey)
|
static byte[] |
encryptPersonalCardField(byte[] data,
byte[] salt,
byte[] initVector,
byte[] pinCode)
|
static String |
getBase64Hash(int bytesCount)
|
static Element |
getCardFromSignedEnvelop(Element sigElement,
boolean validateCertificate,
boolean validateSignature)
|
static Element |
getCardFromSignedEnvelop(InputStream signedCard)
|
static Element |
getCardFromSignedEnvelop(InputStream signedCard,
boolean validateCertificate,
boolean validateSignature)
|
static byte[] |
getDerivedKey(byte[] password,
byte[] salt)
|
static byte[] |
getPinDigest(byte[] pinCode)
|
static byte[] |
getRandomBytes(int bytesCount)
|
static byte[] |
getSubArray(byte[] array,
int offset,
int len)
|
static boolean |
isEncriptedStore(InputStream is)
Checks whether data in the provided InputStream represents
CardSpace backup format (*.crds file format) |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public CardCryptography()
| Method Detail |
public static byte[] getSubArray(byte[] array,
int offset,
int len)
array - offset - len -
public static Document decrypt(InputStream is,
String password)
throws Exception
Document with RoamingStore root element
is - InputStream of backup datapassword - Password used to encrypt backup data
Exceptionpublic static boolean isEncriptedStore(InputStream is)
InputStream represents
CardSpace backup format (*.crds file format)
is - InputStream to check
public static byte[] encryptData(byte[] data,
byte[] initVector,
Key encryptionKey)
throws Exception
data - initVector - encryptionKey -
Exception
public static void encrypt(Document cardsStore,
OutputStream os,
String password)
throws Exception
cardsStore - Document with list of cards in RoamingStore
formatos - OutputStream for data outputpassword - Password used to encrypt backup data
Exception
public static byte[] getDerivedKey(byte[] password,
byte[] salt)
throws NoSuchAlgorithmException
password - salt -
NoSuchAlgorithmException
public static Element getCardFromSignedEnvelop(InputStream signedCard)
throws Exception
signedCard -
Exception
public static Element getCardFromSignedEnvelop(InputStream signedCard,
boolean validateCertificate,
boolean validateSignature)
throws Exception
signedCard - Data in .crd formatvalidateCertificate - true if certificate of issuer should be validated false otherwise.validateSignature - true if signature should be validated false otherwise.
Exception
public static Element getCardFromSignedEnvelop(Element sigElement,
boolean validateCertificate,
boolean validateSignature)
throws Exception
Exception
public static String encodeBase64(byte[] data,
int wrappedStringlen)
String using Base64
data - wrappedStringlen - length of
public static byte[] decodeBase64(String data)
throws org.eclipse.higgins.icard.CardException
String to byte array using Base64
data -
org.eclipse.higgins.icard.CardExceptionpublic static String getBase64Hash(int bytesCount)
bytesCount -
public static byte[] getRandomBytes(int bytesCount)
bytesCount -
public static byte[] decryptPersonalCardField(byte[] encryptedData,
EncryptedMasterKey key)
throws org.eclipse.higgins.icard.CardException
encryptedData - key -
org.eclipse.higgins.icard.CardException
public static byte[] encryptPersonalCardField(byte[] data,
byte[] salt,
byte[] initVector,
byte[] pinCode)
throws org.eclipse.higgins.icard.CardException
data - pinCode -
org.eclipse.higgins.icard.CardException
public static byte[] getPinDigest(byte[] pinCode)
throws org.eclipse.higgins.icard.CardException
pinCode -
org.eclipse.higgins.icard.CardException
|
||||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||