public class CryptoServiceImpl extends Object implements CryptoService
| Constructor and Description |
|---|
CryptoServiceImpl() |
| Modifier and Type | Method and Description |
|---|---|
byte[] |
calcSha1(byte[] content) |
byte[] |
calcSha256(byte[] content) |
byte[] |
composeBodySha1(byte[] sign,
X509Certificate c,
byte[] origHash,
Date signingTime) |
byte[] |
composeBodySha256(byte[] sign,
X509Certificate c,
byte[] origHash,
Date signingTime) |
byte[] |
composeBodySha256(List<bluecrystal.domain.AppSignedInfo> listAsi) |
int |
doIt(String src) |
org.bouncycastle.asn1.DERTaggedObject |
extractDTOSignPolicyOid(byte[] sign,
bluecrystal.domain.SignCompare signCompare) |
String |
extractHashId(byte[] sign) |
byte[] |
extractSignature(byte[] sign) |
bluecrystal.domain.SignCompare |
extractSignCompare(byte[] sign) |
bluecrystal.domain.SignCompare2 |
extractSignCompare2(byte[] sign) |
bluecrystal.domain.SignPolicyRef |
extractVerifyRefence(byte[] policy) |
byte[] |
hashSignedAttribSha1(byte[] origHash,
Date signingTime,
X509Certificate x509) |
byte[] |
hashSignedAttribSha256(byte[] origHash,
Date signingTime,
X509Certificate x509) |
int |
validateSign(byte[] signCms,
byte[] origHash,
Date dtSign,
boolean verifyCRL) |
boolean |
validateSignatureByPolicy(byte[] sign,
byte[] ps) |
boolean |
validateSignatureByPolicy(bluecrystal.domain.SignPolicyRef spr,
bluecrystal.domain.SignCompare sc) |
int |
validateSignByContent(byte[] signCms,
byte[] content,
Date dtSign,
boolean verifyCRL) |
public int doIt(String src)
public byte[] hashSignedAttribSha1(byte[] origHash,
Date signingTime,
X509Certificate x509)
throws Exception
hashSignedAttribSha1 in interface CryptoServiceExceptionpublic byte[] hashSignedAttribSha256(byte[] origHash,
Date signingTime,
X509Certificate x509)
throws Exception
hashSignedAttribSha256 in interface CryptoServiceExceptionpublic byte[] extractSignature(byte[] sign)
throws Exception
extractSignature in interface CryptoServiceExceptionpublic bluecrystal.domain.SignCompare extractSignCompare(byte[] sign)
throws Exception
extractSignCompare in interface CryptoServiceExceptionpublic bluecrystal.domain.SignCompare2 extractSignCompare2(byte[] sign)
throws Exception
extractSignCompare2 in interface CryptoServiceExceptionpublic org.bouncycastle.asn1.DERTaggedObject extractDTOSignPolicyOid(byte[] sign,
bluecrystal.domain.SignCompare signCompare)
throws Exception
Exceptionpublic int validateSignByContent(byte[] signCms,
byte[] content,
Date dtSign,
boolean verifyCRL)
throws Exception
validateSignByContent in interface CryptoServiceExceptionpublic int validateSign(byte[] signCms,
byte[] origHash,
Date dtSign,
boolean verifyCRL)
throws Exception
validateSign in interface CryptoServiceExceptionpublic boolean validateSignatureByPolicy(bluecrystal.domain.SignPolicyRef spr,
bluecrystal.domain.SignCompare sc)
validateSignatureByPolicy in interface CryptoServicepublic bluecrystal.domain.SignPolicyRef extractVerifyRefence(byte[] policy)
throws IOException,
ParseException
extractVerifyRefence in interface CryptoServiceIOExceptionParseExceptionpublic byte[] composeBodySha1(byte[] sign,
X509Certificate c,
byte[] origHash,
Date signingTime)
throws Exception
composeBodySha1 in interface CryptoServiceExceptionpublic byte[] composeBodySha256(byte[] sign,
X509Certificate c,
byte[] origHash,
Date signingTime)
throws Exception
composeBodySha256 in interface CryptoServiceExceptionpublic byte[] composeBodySha256(List<bluecrystal.domain.AppSignedInfo> listAsi) throws Exception
Exceptionpublic byte[] calcSha1(byte[] content)
throws NoSuchAlgorithmException
calcSha1 in interface CryptoServiceNoSuchAlgorithmExceptionpublic byte[] calcSha256(byte[] content)
throws NoSuchAlgorithmException
calcSha256 in interface CryptoServiceNoSuchAlgorithmExceptionpublic boolean validateSignatureByPolicy(byte[] sign,
byte[] ps)
throws Exception
validateSignatureByPolicy in interface CryptoServiceExceptionCopyright © 2016. All rights reserved.