diff --git a/ChangeLog.txt b/ChangeLog.txt
index c2e4f56a..0f92979c 100755
--- a/ChangeLog.txt
+++ b/ChangeLog.txt
@@ -1,6 +1,14 @@
ChangeLog for jsrsasign
+remove RSA and RSAOAEP encryption for Marvin attack
+* Changes from 10.9.0 to 11.0.0 (2024-Jan-16)
+ - remove RSA PKCS#1.5 end OAEP encryption/decryption for Marvin attack (#598)
+ - src/crypto.js
+ - remove KJUR.crypto.Cipher class for RSA and RSAOAEP encryption/decryption
+ - ext/{rsa,rsa2}.js
+ remove encrypt/decrypt/encryptOAEP/decryptOAEP for RSAKey class
+
enhanced support for encrypted PKCS8
* Changes from 10.8.6 to 10.9.0 (2023-Nov-27)
- KEYUTIL.getPEM is updated not to use weak ciphers (#599)
diff --git a/api/files.html b/api/files.html
index b2ce4865..69e38753 100644
--- a/api/files.html
+++ b/api/files.html
@@ -482,8 +482,6 @@
class for DSA signing and verifcation
diff --git a/api/symbols/ASN1HEX.html b/api/symbols/ASN1HEX.html
index 577e7f24..97b3f9c2 100644
--- a/api/symbols/ASN1HEX.html
+++ b/api/symbols/ASN1HEX.html
@@ -487,8 +487,6 @@
Classes
KJUR.crypto
-
KJUR.crypto.Cipher
-
KJUR.crypto.DSA
KJUR.crypto.ECDSA
diff --git a/api/symbols/Base64x.html b/api/symbols/Base64x.html
index f546f5dc..ad1f04d8 100644
--- a/api/symbols/Base64x.html
+++ b/api/symbols/Base64x.html
@@ -487,8 +487,6 @@
Classes
KJUR.crypto
-
KJUR.crypto.Cipher
-
KJUR.crypto.DSA
KJUR.crypto.ECDSA
diff --git a/api/symbols/KEYUTIL.html b/api/symbols/KEYUTIL.html
index 5a7e043b..a3774d33 100644
--- a/api/symbols/KEYUTIL.html
+++ b/api/symbols/KEYUTIL.html
@@ -487,8 +487,6 @@
Classes
KJUR.crypto
-
KJUR.crypto.Cipher
-
KJUR.crypto.DSA
KJUR.crypto.ECDSA
diff --git a/api/symbols/KJUR.asn1.ASN1Object.html b/api/symbols/KJUR.asn1.ASN1Object.html
index 00e3eed0..a302e005 100644
--- a/api/symbols/KJUR.asn1.ASN1Object.html
+++ b/api/symbols/KJUR.asn1.ASN1Object.html
@@ -487,8 +487,6 @@
Classes
KJUR.crypto
-
KJUR.crypto.Cipher
-
KJUR.crypto.DSA
KJUR.crypto.ECDSA
diff --git a/api/symbols/KJUR.asn1.ASN1Util.html b/api/symbols/KJUR.asn1.ASN1Util.html
index 1c3dba66..6d11786f 100644
--- a/api/symbols/KJUR.asn1.ASN1Util.html
+++ b/api/symbols/KJUR.asn1.ASN1Util.html
@@ -487,8 +487,6 @@
Classes
KJUR.crypto
-
KJUR.crypto.Cipher
-
KJUR.crypto.DSA
KJUR.crypto.ECDSA
diff --git a/api/symbols/KJUR.asn1.DERAbstractString.html b/api/symbols/KJUR.asn1.DERAbstractString.html
index c6668cf5..3355fc45 100644
--- a/api/symbols/KJUR.asn1.DERAbstractString.html
+++ b/api/symbols/KJUR.asn1.DERAbstractString.html
@@ -487,8 +487,6 @@
Classes
KJUR.crypto
-
KJUR.crypto.Cipher
-
KJUR.crypto.DSA
KJUR.crypto.ECDSA
diff --git a/api/symbols/KJUR.asn1.DERAbstractStructured.html b/api/symbols/KJUR.asn1.DERAbstractStructured.html
index 2f40b1dc..4f4beba2 100644
--- a/api/symbols/KJUR.asn1.DERAbstractStructured.html
+++ b/api/symbols/KJUR.asn1.DERAbstractStructured.html
@@ -487,8 +487,6 @@
Classes
KJUR.crypto
-
KJUR.crypto.Cipher
-
KJUR.crypto.DSA
KJUR.crypto.ECDSA
diff --git a/api/symbols/KJUR.asn1.DERAbstractTime.html b/api/symbols/KJUR.asn1.DERAbstractTime.html
index 95b633db..488eebb9 100644
--- a/api/symbols/KJUR.asn1.DERAbstractTime.html
+++ b/api/symbols/KJUR.asn1.DERAbstractTime.html
@@ -487,8 +487,6 @@
Classes
KJUR.crypto
-
KJUR.crypto.Cipher
-
KJUR.crypto.DSA
KJUR.crypto.ECDSA
diff --git a/api/symbols/KJUR.asn1.DERBMPString.html b/api/symbols/KJUR.asn1.DERBMPString.html
index 143ec9db..d8d771e3 100644
--- a/api/symbols/KJUR.asn1.DERBMPString.html
+++ b/api/symbols/KJUR.asn1.DERBMPString.html
@@ -487,8 +487,6 @@
Classes
KJUR.crypto
-
KJUR.crypto.Cipher
-
KJUR.crypto.DSA
KJUR.crypto.ECDSA
diff --git a/api/symbols/KJUR.asn1.DERBitString.html b/api/symbols/KJUR.asn1.DERBitString.html
index 96400c32..59d8934f 100644
--- a/api/symbols/KJUR.asn1.DERBitString.html
+++ b/api/symbols/KJUR.asn1.DERBitString.html
@@ -487,8 +487,6 @@
Classes
KJUR.crypto
-
KJUR.crypto.Cipher
-
KJUR.crypto.DSA
KJUR.crypto.ECDSA
diff --git a/api/symbols/KJUR.asn1.DERBoolean.html b/api/symbols/KJUR.asn1.DERBoolean.html
index 9809f00c..0a996cd9 100644
--- a/api/symbols/KJUR.asn1.DERBoolean.html
+++ b/api/symbols/KJUR.asn1.DERBoolean.html
@@ -487,8 +487,6 @@
Classes
KJUR.crypto
-
KJUR.crypto.Cipher
-
KJUR.crypto.DSA
KJUR.crypto.ECDSA
diff --git a/api/symbols/KJUR.asn1.DEREnumerated.html b/api/symbols/KJUR.asn1.DEREnumerated.html
index 3485f2cd..a401a74c 100644
--- a/api/symbols/KJUR.asn1.DEREnumerated.html
+++ b/api/symbols/KJUR.asn1.DEREnumerated.html
@@ -487,8 +487,6 @@
Classes
KJUR.crypto
-
KJUR.crypto.Cipher
-
KJUR.crypto.DSA
KJUR.crypto.ECDSA
diff --git a/api/symbols/KJUR.asn1.DERGeneralizedTime.html b/api/symbols/KJUR.asn1.DERGeneralizedTime.html
index bede56a6..56b1bded 100644
--- a/api/symbols/KJUR.asn1.DERGeneralizedTime.html
+++ b/api/symbols/KJUR.asn1.DERGeneralizedTime.html
@@ -487,8 +487,6 @@
Classes
KJUR.crypto
-
KJUR.crypto.Cipher
-
KJUR.crypto.DSA
KJUR.crypto.ECDSA
diff --git a/api/symbols/KJUR.asn1.DERIA5String.html b/api/symbols/KJUR.asn1.DERIA5String.html
index eb850933..d2a16352 100644
--- a/api/symbols/KJUR.asn1.DERIA5String.html
+++ b/api/symbols/KJUR.asn1.DERIA5String.html
@@ -487,8 +487,6 @@
Classes
KJUR.crypto
-
KJUR.crypto.Cipher
-
KJUR.crypto.DSA
KJUR.crypto.ECDSA
diff --git a/api/symbols/KJUR.asn1.DERInteger.html b/api/symbols/KJUR.asn1.DERInteger.html
index e147cf5f..1108dd80 100644
--- a/api/symbols/KJUR.asn1.DERInteger.html
+++ b/api/symbols/KJUR.asn1.DERInteger.html
@@ -487,8 +487,6 @@
Classes
KJUR.crypto
-
KJUR.crypto.Cipher
-
KJUR.crypto.DSA
KJUR.crypto.ECDSA
diff --git a/api/symbols/KJUR.asn1.DERNull.html b/api/symbols/KJUR.asn1.DERNull.html
index 51bd2cac..13b6ddca 100644
--- a/api/symbols/KJUR.asn1.DERNull.html
+++ b/api/symbols/KJUR.asn1.DERNull.html
@@ -487,8 +487,6 @@
Classes
KJUR.crypto
-
KJUR.crypto.Cipher
-
KJUR.crypto.DSA
KJUR.crypto.ECDSA
diff --git a/api/symbols/KJUR.asn1.DERNumericString.html b/api/symbols/KJUR.asn1.DERNumericString.html
index d4636733..d80550a3 100644
--- a/api/symbols/KJUR.asn1.DERNumericString.html
+++ b/api/symbols/KJUR.asn1.DERNumericString.html
@@ -487,8 +487,6 @@
Classes
KJUR.crypto
-
KJUR.crypto.Cipher
-
KJUR.crypto.DSA
KJUR.crypto.ECDSA
diff --git a/api/symbols/KJUR.asn1.DERObjectIdentifier.html b/api/symbols/KJUR.asn1.DERObjectIdentifier.html
index a2540b30..0fbb8d81 100644
--- a/api/symbols/KJUR.asn1.DERObjectIdentifier.html
+++ b/api/symbols/KJUR.asn1.DERObjectIdentifier.html
@@ -487,8 +487,6 @@
Classes
KJUR.crypto
-
KJUR.crypto.Cipher
-
KJUR.crypto.DSA
KJUR.crypto.ECDSA
diff --git a/api/symbols/KJUR.asn1.DEROctetString.html b/api/symbols/KJUR.asn1.DEROctetString.html
index 8eff1f73..72fb4e50 100644
--- a/api/symbols/KJUR.asn1.DEROctetString.html
+++ b/api/symbols/KJUR.asn1.DEROctetString.html
@@ -487,8 +487,6 @@
Classes
KJUR.crypto
-
KJUR.crypto.Cipher
-
KJUR.crypto.DSA
KJUR.crypto.ECDSA
diff --git a/api/symbols/KJUR.asn1.DERPrintableString.html b/api/symbols/KJUR.asn1.DERPrintableString.html
index 0c35b29d..723449d7 100644
--- a/api/symbols/KJUR.asn1.DERPrintableString.html
+++ b/api/symbols/KJUR.asn1.DERPrintableString.html
@@ -487,8 +487,6 @@
Classes
KJUR.crypto
-
KJUR.crypto.Cipher
-
KJUR.crypto.DSA
KJUR.crypto.ECDSA
diff --git a/api/symbols/KJUR.asn1.DERSequence.html b/api/symbols/KJUR.asn1.DERSequence.html
index ca699a0d..e84a8f64 100644
--- a/api/symbols/KJUR.asn1.DERSequence.html
+++ b/api/symbols/KJUR.asn1.DERSequence.html
@@ -487,8 +487,6 @@
Classes
KJUR.crypto
-
KJUR.crypto.Cipher
-
KJUR.crypto.DSA
KJUR.crypto.ECDSA
diff --git a/api/symbols/KJUR.asn1.DERSet.html b/api/symbols/KJUR.asn1.DERSet.html
index 8b846d5f..5cf28169 100644
--- a/api/symbols/KJUR.asn1.DERSet.html
+++ b/api/symbols/KJUR.asn1.DERSet.html
@@ -487,8 +487,6 @@
Classes
KJUR.crypto
-
KJUR.crypto.Cipher
-
KJUR.crypto.DSA
KJUR.crypto.ECDSA
diff --git a/api/symbols/KJUR.asn1.DERTaggedObject.html b/api/symbols/KJUR.asn1.DERTaggedObject.html
index 29e84d2e..cd688eaf 100644
--- a/api/symbols/KJUR.asn1.DERTaggedObject.html
+++ b/api/symbols/KJUR.asn1.DERTaggedObject.html
@@ -487,8 +487,6 @@
Classes
KJUR.crypto
-
KJUR.crypto.Cipher
-
KJUR.crypto.DSA
KJUR.crypto.ECDSA
diff --git a/api/symbols/KJUR.asn1.DERTeletexString.html b/api/symbols/KJUR.asn1.DERTeletexString.html
index 568579f6..ff7778f5 100644
--- a/api/symbols/KJUR.asn1.DERTeletexString.html
+++ b/api/symbols/KJUR.asn1.DERTeletexString.html
@@ -487,8 +487,6 @@
Classes
KJUR.crypto
-
KJUR.crypto.Cipher
-
KJUR.crypto.DSA
KJUR.crypto.ECDSA
diff --git a/api/symbols/KJUR.asn1.DERUTCTime.html b/api/symbols/KJUR.asn1.DERUTCTime.html
index 2141e3f9..e501eff3 100644
--- a/api/symbols/KJUR.asn1.DERUTCTime.html
+++ b/api/symbols/KJUR.asn1.DERUTCTime.html
@@ -487,8 +487,6 @@
Classes
KJUR.crypto
-
KJUR.crypto.Cipher
-
KJUR.crypto.DSA
KJUR.crypto.ECDSA
diff --git a/api/symbols/KJUR.asn1.DERUTF8String.html b/api/symbols/KJUR.asn1.DERUTF8String.html
index 63093bdc..3d60f24f 100644
--- a/api/symbols/KJUR.asn1.DERUTF8String.html
+++ b/api/symbols/KJUR.asn1.DERUTF8String.html
@@ -487,8 +487,6 @@
Classes
KJUR.crypto
-
KJUR.crypto.Cipher
-
KJUR.crypto.DSA
KJUR.crypto.ECDSA
diff --git a/api/symbols/KJUR.asn1.DERVisibleString.html b/api/symbols/KJUR.asn1.DERVisibleString.html
index cfb0fac9..fecac4da 100644
--- a/api/symbols/KJUR.asn1.DERVisibleString.html
+++ b/api/symbols/KJUR.asn1.DERVisibleString.html
@@ -487,8 +487,6 @@
Classes
KJUR.crypto
-
KJUR.crypto.Cipher
-
KJUR.crypto.DSA
KJUR.crypto.ECDSA
diff --git a/api/symbols/KJUR.asn1.cades.CAdESUtil.html b/api/symbols/KJUR.asn1.cades.CAdESUtil.html
index 724729cd..c9649c2e 100644
--- a/api/symbols/KJUR.asn1.cades.CAdESUtil.html
+++ b/api/symbols/KJUR.asn1.cades.CAdESUtil.html
@@ -487,8 +487,6 @@
Classes
KJUR.crypto
-
KJUR.crypto.Cipher
-
KJUR.crypto.DSA
KJUR.crypto.ECDSA
diff --git a/api/symbols/KJUR.asn1.cades.CompleteCertificateRefs.html b/api/symbols/KJUR.asn1.cades.CompleteCertificateRefs.html
index 04e54d3a..5626e11c 100644
--- a/api/symbols/KJUR.asn1.cades.CompleteCertificateRefs.html
+++ b/api/symbols/KJUR.asn1.cades.CompleteCertificateRefs.html
@@ -487,8 +487,6 @@
Classes
KJUR.crypto
-
KJUR.crypto.Cipher
-
KJUR.crypto.DSA
KJUR.crypto.ECDSA
diff --git a/api/symbols/KJUR.asn1.cades.OtherCertID.html b/api/symbols/KJUR.asn1.cades.OtherCertID.html
index 13d7dc57..44064e6e 100644
--- a/api/symbols/KJUR.asn1.cades.OtherCertID.html
+++ b/api/symbols/KJUR.asn1.cades.OtherCertID.html
@@ -487,8 +487,6 @@
Classes
KJUR.crypto
-
KJUR.crypto.Cipher
-
KJUR.crypto.DSA
KJUR.crypto.ECDSA
diff --git a/api/symbols/KJUR.asn1.cades.OtherHash.html b/api/symbols/KJUR.asn1.cades.OtherHash.html
index 4f399981..cc3b7ce0 100644
--- a/api/symbols/KJUR.asn1.cades.OtherHash.html
+++ b/api/symbols/KJUR.asn1.cades.OtherHash.html
@@ -487,8 +487,6 @@
Classes
KJUR.crypto
-
KJUR.crypto.Cipher
-
KJUR.crypto.DSA
KJUR.crypto.ECDSA
diff --git a/api/symbols/KJUR.asn1.cades.OtherHashAlgAndValue.html b/api/symbols/KJUR.asn1.cades.OtherHashAlgAndValue.html
index af32ea79..74c33ff5 100644
--- a/api/symbols/KJUR.asn1.cades.OtherHashAlgAndValue.html
+++ b/api/symbols/KJUR.asn1.cades.OtherHashAlgAndValue.html
@@ -487,8 +487,6 @@
Classes
KJUR.crypto
-
KJUR.crypto.Cipher
-
KJUR.crypto.DSA
KJUR.crypto.ECDSA
diff --git a/api/symbols/KJUR.asn1.cades.OtherHashValue.html b/api/symbols/KJUR.asn1.cades.OtherHashValue.html
index 97d41780..58162e3d 100644
--- a/api/symbols/KJUR.asn1.cades.OtherHashValue.html
+++ b/api/symbols/KJUR.asn1.cades.OtherHashValue.html
@@ -487,8 +487,6 @@
Classes
KJUR.crypto
-
KJUR.crypto.Cipher
-
KJUR.crypto.DSA
KJUR.crypto.ECDSA
diff --git a/api/symbols/KJUR.asn1.cades.SignaturePolicyId.html b/api/symbols/KJUR.asn1.cades.SignaturePolicyId.html
index a251f773..e236a3b0 100644
--- a/api/symbols/KJUR.asn1.cades.SignaturePolicyId.html
+++ b/api/symbols/KJUR.asn1.cades.SignaturePolicyId.html
@@ -487,8 +487,6 @@
Classes
KJUR.crypto
-
KJUR.crypto.Cipher
-
KJUR.crypto.DSA
KJUR.crypto.ECDSA
diff --git a/api/symbols/KJUR.asn1.cades.SignaturePolicyIdentifier.html b/api/symbols/KJUR.asn1.cades.SignaturePolicyIdentifier.html
index c0e6f6c0..43879510 100644
--- a/api/symbols/KJUR.asn1.cades.SignaturePolicyIdentifier.html
+++ b/api/symbols/KJUR.asn1.cades.SignaturePolicyIdentifier.html
@@ -487,8 +487,6 @@
Classes
KJUR.crypto
-
KJUR.crypto.Cipher
-
KJUR.crypto.DSA
KJUR.crypto.ECDSA
diff --git a/api/symbols/KJUR.asn1.cades.SignatureTimeStamp.html b/api/symbols/KJUR.asn1.cades.SignatureTimeStamp.html
index eb227864..9657f395 100644
--- a/api/symbols/KJUR.asn1.cades.SignatureTimeStamp.html
+++ b/api/symbols/KJUR.asn1.cades.SignatureTimeStamp.html
@@ -487,8 +487,6 @@
Classes
KJUR.crypto
-
KJUR.crypto.Cipher
-
KJUR.crypto.DSA
KJUR.crypto.ECDSA
diff --git a/api/symbols/KJUR.asn1.cades.html b/api/symbols/KJUR.asn1.cades.html
index 00339077..0f2ffe33 100644
--- a/api/symbols/KJUR.asn1.cades.html
+++ b/api/symbols/KJUR.asn1.cades.html
@@ -487,8 +487,6 @@
Classes
KJUR.crypto
-
KJUR.crypto.Cipher
-
KJUR.crypto.DSA
KJUR.crypto.ECDSA
diff --git a/api/symbols/KJUR.asn1.cms.Attribute.html b/api/symbols/KJUR.asn1.cms.Attribute.html
index 47a35cc8..68dc72a6 100644
--- a/api/symbols/KJUR.asn1.cms.Attribute.html
+++ b/api/symbols/KJUR.asn1.cms.Attribute.html
@@ -487,8 +487,6 @@
Classes
KJUR.crypto
-
KJUR.crypto.Cipher
-
KJUR.crypto.DSA
KJUR.crypto.ECDSA
diff --git a/api/symbols/KJUR.asn1.cms.AttributeList.html b/api/symbols/KJUR.asn1.cms.AttributeList.html
index e04f3751..bc026395 100644
--- a/api/symbols/KJUR.asn1.cms.AttributeList.html
+++ b/api/symbols/KJUR.asn1.cms.AttributeList.html
@@ -487,8 +487,6 @@
Classes
KJUR.crypto
-
KJUR.crypto.Cipher
-
KJUR.crypto.DSA
KJUR.crypto.ECDSA
diff --git a/api/symbols/KJUR.asn1.cms.CMSParser.html b/api/symbols/KJUR.asn1.cms.CMSParser.html
index a1857b3a..15fe5914 100644
--- a/api/symbols/KJUR.asn1.cms.CMSParser.html
+++ b/api/symbols/KJUR.asn1.cms.CMSParser.html
@@ -487,8 +487,6 @@
Classes
KJUR.crypto
-
KJUR.crypto.Cipher
-
KJUR.crypto.DSA
KJUR.crypto.ECDSA
diff --git a/api/symbols/KJUR.asn1.cms.CMSUtil.html b/api/symbols/KJUR.asn1.cms.CMSUtil.html
index 96e7c5c7..4d6144ed 100644
--- a/api/symbols/KJUR.asn1.cms.CMSUtil.html
+++ b/api/symbols/KJUR.asn1.cms.CMSUtil.html
@@ -487,8 +487,6 @@
Classes
KJUR.crypto
-
KJUR.crypto.Cipher
-
KJUR.crypto.DSA
KJUR.crypto.ECDSA
diff --git a/api/symbols/KJUR.asn1.cms.CertificateSet.html b/api/symbols/KJUR.asn1.cms.CertificateSet.html
index 0ed47b11..d11a0554 100644
--- a/api/symbols/KJUR.asn1.cms.CertificateSet.html
+++ b/api/symbols/KJUR.asn1.cms.CertificateSet.html
@@ -487,8 +487,6 @@
Classes
KJUR.crypto
-
KJUR.crypto.Cipher
-
KJUR.crypto.DSA
KJUR.crypto.ECDSA
diff --git a/api/symbols/KJUR.asn1.cms.ContentInfo.html b/api/symbols/KJUR.asn1.cms.ContentInfo.html
index 16124b1f..ce09829c 100644
--- a/api/symbols/KJUR.asn1.cms.ContentInfo.html
+++ b/api/symbols/KJUR.asn1.cms.ContentInfo.html
@@ -487,8 +487,6 @@
Classes
KJUR.crypto
-
KJUR.crypto.Cipher
-
KJUR.crypto.DSA
KJUR.crypto.ECDSA
diff --git a/api/symbols/KJUR.asn1.cms.ContentType.html b/api/symbols/KJUR.asn1.cms.ContentType.html
index 2a31f8ae..aa8b8727 100644
--- a/api/symbols/KJUR.asn1.cms.ContentType.html
+++ b/api/symbols/KJUR.asn1.cms.ContentType.html
@@ -487,8 +487,6 @@
Classes
KJUR.crypto
-
KJUR.crypto.Cipher
-
KJUR.crypto.DSA
KJUR.crypto.ECDSA
diff --git a/api/symbols/KJUR.asn1.cms.ESSCertID.html b/api/symbols/KJUR.asn1.cms.ESSCertID.html
index 6215d733..af07f1de 100644
--- a/api/symbols/KJUR.asn1.cms.ESSCertID.html
+++ b/api/symbols/KJUR.asn1.cms.ESSCertID.html
@@ -487,8 +487,6 @@
Classes
KJUR.crypto
-
KJUR.crypto.Cipher
-
KJUR.crypto.DSA
KJUR.crypto.ECDSA
diff --git a/api/symbols/KJUR.asn1.cms.ESSCertIDv2.html b/api/symbols/KJUR.asn1.cms.ESSCertIDv2.html
index 971a91a4..23dd069c 100644
--- a/api/symbols/KJUR.asn1.cms.ESSCertIDv2.html
+++ b/api/symbols/KJUR.asn1.cms.ESSCertIDv2.html
@@ -487,8 +487,6 @@
Classes
KJUR.crypto
-
KJUR.crypto.Cipher
-
KJUR.crypto.DSA
KJUR.crypto.ECDSA
diff --git a/api/symbols/KJUR.asn1.cms.EncapsulatedContentInfo.html b/api/symbols/KJUR.asn1.cms.EncapsulatedContentInfo.html
index fdebc5da..0bb8c903 100644
--- a/api/symbols/KJUR.asn1.cms.EncapsulatedContentInfo.html
+++ b/api/symbols/KJUR.asn1.cms.EncapsulatedContentInfo.html
@@ -487,8 +487,6 @@
Classes
KJUR.crypto
-
KJUR.crypto.Cipher
-
KJUR.crypto.DSA
KJUR.crypto.ECDSA
diff --git a/api/symbols/KJUR.asn1.cms.IssuerAndSerialNumber.html b/api/symbols/KJUR.asn1.cms.IssuerAndSerialNumber.html
index 3c5bcf07..2c866015 100644
--- a/api/symbols/KJUR.asn1.cms.IssuerAndSerialNumber.html
+++ b/api/symbols/KJUR.asn1.cms.IssuerAndSerialNumber.html
@@ -487,8 +487,6 @@
Classes
KJUR.crypto
-
KJUR.crypto.Cipher
-
KJUR.crypto.DSA
KJUR.crypto.ECDSA
diff --git a/api/symbols/KJUR.asn1.cms.IssuerSerial.html b/api/symbols/KJUR.asn1.cms.IssuerSerial.html
index 76f6f4e6..c2078610 100644
--- a/api/symbols/KJUR.asn1.cms.IssuerSerial.html
+++ b/api/symbols/KJUR.asn1.cms.IssuerSerial.html
@@ -487,8 +487,6 @@
Classes
KJUR.crypto
-
KJUR.crypto.Cipher
-
KJUR.crypto.DSA
KJUR.crypto.ECDSA
diff --git a/api/symbols/KJUR.asn1.cms.MessageDigest.html b/api/symbols/KJUR.asn1.cms.MessageDigest.html
index 4c778dd1..bd1f5b53 100644
--- a/api/symbols/KJUR.asn1.cms.MessageDigest.html
+++ b/api/symbols/KJUR.asn1.cms.MessageDigest.html
@@ -487,8 +487,6 @@
Classes
KJUR.crypto
-
KJUR.crypto.Cipher
-
KJUR.crypto.DSA
KJUR.crypto.ECDSA
diff --git a/api/symbols/KJUR.asn1.cms.OtherRevocationFormat.html b/api/symbols/KJUR.asn1.cms.OtherRevocationFormat.html
index 2a085e26..6b394aaf 100644
--- a/api/symbols/KJUR.asn1.cms.OtherRevocationFormat.html
+++ b/api/symbols/KJUR.asn1.cms.OtherRevocationFormat.html
@@ -487,8 +487,6 @@
Classes
KJUR.crypto
-
KJUR.crypto.Cipher
-
KJUR.crypto.DSA
KJUR.crypto.ECDSA
diff --git a/api/symbols/KJUR.asn1.cms.RevocationInfoChoice.html b/api/symbols/KJUR.asn1.cms.RevocationInfoChoice.html
index 6318ae69..b7428607 100644
--- a/api/symbols/KJUR.asn1.cms.RevocationInfoChoice.html
+++ b/api/symbols/KJUR.asn1.cms.RevocationInfoChoice.html
@@ -487,8 +487,6 @@
Classes
KJUR.crypto
-
KJUR.crypto.Cipher
-
KJUR.crypto.DSA
KJUR.crypto.ECDSA
diff --git a/api/symbols/KJUR.asn1.cms.RevocationInfoChoices.html b/api/symbols/KJUR.asn1.cms.RevocationInfoChoices.html
index e3097d27..ea188996 100644
--- a/api/symbols/KJUR.asn1.cms.RevocationInfoChoices.html
+++ b/api/symbols/KJUR.asn1.cms.RevocationInfoChoices.html
@@ -487,8 +487,6 @@
Classes
KJUR.crypto
-
KJUR.crypto.Cipher
-
KJUR.crypto.DSA
KJUR.crypto.ECDSA
diff --git a/api/symbols/KJUR.asn1.cms.SignedData.html b/api/symbols/KJUR.asn1.cms.SignedData.html
index 5fb3581c..d0b8f25e 100644
--- a/api/symbols/KJUR.asn1.cms.SignedData.html
+++ b/api/symbols/KJUR.asn1.cms.SignedData.html
@@ -487,8 +487,6 @@
Classes
KJUR.crypto
-
KJUR.crypto.Cipher
-
KJUR.crypto.DSA
KJUR.crypto.ECDSA
diff --git a/api/symbols/KJUR.asn1.cms.SignerIdentifier.html b/api/symbols/KJUR.asn1.cms.SignerIdentifier.html
index 182206a5..2f5d2b0b 100644
--- a/api/symbols/KJUR.asn1.cms.SignerIdentifier.html
+++ b/api/symbols/KJUR.asn1.cms.SignerIdentifier.html
@@ -487,8 +487,6 @@
Classes
KJUR.crypto
-
KJUR.crypto.Cipher
-
KJUR.crypto.DSA
KJUR.crypto.ECDSA
diff --git a/api/symbols/KJUR.asn1.cms.SignerInfo.html b/api/symbols/KJUR.asn1.cms.SignerInfo.html
index 95038f08..ad79a684 100644
--- a/api/symbols/KJUR.asn1.cms.SignerInfo.html
+++ b/api/symbols/KJUR.asn1.cms.SignerInfo.html
@@ -487,8 +487,6 @@
Classes
KJUR.crypto
-
KJUR.crypto.Cipher
-
KJUR.crypto.DSA
KJUR.crypto.ECDSA
diff --git a/api/symbols/KJUR.asn1.cms.SigningCertificate.html b/api/symbols/KJUR.asn1.cms.SigningCertificate.html
index 1941bb98..760085c7 100644
--- a/api/symbols/KJUR.asn1.cms.SigningCertificate.html
+++ b/api/symbols/KJUR.asn1.cms.SigningCertificate.html
@@ -487,8 +487,6 @@
Classes
KJUR.crypto
-
KJUR.crypto.Cipher
-
KJUR.crypto.DSA
KJUR.crypto.ECDSA
diff --git a/api/symbols/KJUR.asn1.cms.SigningCertificateV2.html b/api/symbols/KJUR.asn1.cms.SigningCertificateV2.html
index d7eba409..40fbd3d3 100644
--- a/api/symbols/KJUR.asn1.cms.SigningCertificateV2.html
+++ b/api/symbols/KJUR.asn1.cms.SigningCertificateV2.html
@@ -487,8 +487,6 @@
Classes
KJUR.crypto
-
KJUR.crypto.Cipher
-
KJUR.crypto.DSA
KJUR.crypto.ECDSA
diff --git a/api/symbols/KJUR.asn1.cms.SigningTime.html b/api/symbols/KJUR.asn1.cms.SigningTime.html
index 306bd429..67cdc34a 100644
--- a/api/symbols/KJUR.asn1.cms.SigningTime.html
+++ b/api/symbols/KJUR.asn1.cms.SigningTime.html
@@ -487,8 +487,6 @@
Classes
KJUR.crypto
-
KJUR.crypto.Cipher
-
KJUR.crypto.DSA
KJUR.crypto.ECDSA
diff --git a/api/symbols/KJUR.asn1.cms.SubjectKeyIdentifier.html b/api/symbols/KJUR.asn1.cms.SubjectKeyIdentifier.html
index f98abc54..25b786c7 100644
--- a/api/symbols/KJUR.asn1.cms.SubjectKeyIdentifier.html
+++ b/api/symbols/KJUR.asn1.cms.SubjectKeyIdentifier.html
@@ -487,8 +487,6 @@
Classes
KJUR.crypto
-
KJUR.crypto.Cipher
-
KJUR.crypto.DSA
KJUR.crypto.ECDSA
diff --git a/api/symbols/KJUR.asn1.cms.html b/api/symbols/KJUR.asn1.cms.html
index 0cf96989..5ee9b982 100644
--- a/api/symbols/KJUR.asn1.cms.html
+++ b/api/symbols/KJUR.asn1.cms.html
@@ -487,8 +487,6 @@
Classes
KJUR.crypto
-
KJUR.crypto.Cipher
-
KJUR.crypto.DSA
KJUR.crypto.ECDSA
diff --git a/api/symbols/KJUR.asn1.csr.CSRUtil.html b/api/symbols/KJUR.asn1.csr.CSRUtil.html
index 3918cf26..7893b470 100644
--- a/api/symbols/KJUR.asn1.csr.CSRUtil.html
+++ b/api/symbols/KJUR.asn1.csr.CSRUtil.html
@@ -487,8 +487,6 @@
Classes
KJUR.crypto
-
KJUR.crypto.Cipher
-
KJUR.crypto.DSA
KJUR.crypto.ECDSA
diff --git a/api/symbols/KJUR.asn1.csr.CertificationRequest.html b/api/symbols/KJUR.asn1.csr.CertificationRequest.html
index ed15f722..42a747d6 100644
--- a/api/symbols/KJUR.asn1.csr.CertificationRequest.html
+++ b/api/symbols/KJUR.asn1.csr.CertificationRequest.html
@@ -487,8 +487,6 @@
Classes
KJUR.crypto
-
KJUR.crypto.Cipher
-
KJUR.crypto.DSA
KJUR.crypto.ECDSA
diff --git a/api/symbols/KJUR.asn1.csr.CertificationRequestInfo.html b/api/symbols/KJUR.asn1.csr.CertificationRequestInfo.html
index 07c5ed26..d62dd130 100644
--- a/api/symbols/KJUR.asn1.csr.CertificationRequestInfo.html
+++ b/api/symbols/KJUR.asn1.csr.CertificationRequestInfo.html
@@ -487,8 +487,6 @@
Classes
KJUR.crypto
-
KJUR.crypto.Cipher
-
KJUR.crypto.DSA
KJUR.crypto.ECDSA
diff --git a/api/symbols/KJUR.asn1.csr.html b/api/symbols/KJUR.asn1.csr.html
index 85b80585..28f91a87 100644
--- a/api/symbols/KJUR.asn1.csr.html
+++ b/api/symbols/KJUR.asn1.csr.html
@@ -487,8 +487,6 @@
Classes
KJUR.crypto
-
KJUR.crypto.Cipher
-
KJUR.crypto.DSA
KJUR.crypto.ECDSA
diff --git a/api/symbols/KJUR.asn1.html b/api/symbols/KJUR.asn1.html
index ddef8ebd..ea829e79 100644
--- a/api/symbols/KJUR.asn1.html
+++ b/api/symbols/KJUR.asn1.html
@@ -487,8 +487,6 @@
Classes
KJUR.crypto
-
KJUR.crypto.Cipher
-
KJUR.crypto.DSA
KJUR.crypto.ECDSA
diff --git a/api/symbols/KJUR.asn1.ocsp.BasicOCSPResponse.html b/api/symbols/KJUR.asn1.ocsp.BasicOCSPResponse.html
index dda6b53c..8a26a199 100644
--- a/api/symbols/KJUR.asn1.ocsp.BasicOCSPResponse.html
+++ b/api/symbols/KJUR.asn1.ocsp.BasicOCSPResponse.html
@@ -487,8 +487,6 @@
Classes
KJUR.crypto
-
KJUR.crypto.Cipher
-
KJUR.crypto.DSA
KJUR.crypto.ECDSA
diff --git a/api/symbols/KJUR.asn1.ocsp.CertID.html b/api/symbols/KJUR.asn1.ocsp.CertID.html
index 57be6ca5..cbff375d 100644
--- a/api/symbols/KJUR.asn1.ocsp.CertID.html
+++ b/api/symbols/KJUR.asn1.ocsp.CertID.html
@@ -487,8 +487,6 @@
Classes
KJUR.crypto
-
KJUR.crypto.Cipher
-
KJUR.crypto.DSA
KJUR.crypto.ECDSA
diff --git a/api/symbols/KJUR.asn1.ocsp.CertStatus.html b/api/symbols/KJUR.asn1.ocsp.CertStatus.html
index ac286eb3..ac5beddb 100644
--- a/api/symbols/KJUR.asn1.ocsp.CertStatus.html
+++ b/api/symbols/KJUR.asn1.ocsp.CertStatus.html
@@ -487,8 +487,6 @@
Classes
KJUR.crypto
-
KJUR.crypto.Cipher
-
KJUR.crypto.DSA
KJUR.crypto.ECDSA
diff --git a/api/symbols/KJUR.asn1.ocsp.OCSPParser.html b/api/symbols/KJUR.asn1.ocsp.OCSPParser.html
index 80c6ee44..5a9fceb4 100644
--- a/api/symbols/KJUR.asn1.ocsp.OCSPParser.html
+++ b/api/symbols/KJUR.asn1.ocsp.OCSPParser.html
@@ -487,8 +487,6 @@
Classes
KJUR.crypto
-
KJUR.crypto.Cipher
-
KJUR.crypto.DSA
KJUR.crypto.ECDSA
diff --git a/api/symbols/KJUR.asn1.ocsp.OCSPRequest.html b/api/symbols/KJUR.asn1.ocsp.OCSPRequest.html
index 3913129f..1947af5b 100644
--- a/api/symbols/KJUR.asn1.ocsp.OCSPRequest.html
+++ b/api/symbols/KJUR.asn1.ocsp.OCSPRequest.html
@@ -487,8 +487,6 @@
Classes
KJUR.crypto
-
KJUR.crypto.Cipher
-
KJUR.crypto.DSA
KJUR.crypto.ECDSA
diff --git a/api/symbols/KJUR.asn1.ocsp.OCSPResponse.html b/api/symbols/KJUR.asn1.ocsp.OCSPResponse.html
index a7b2971f..cb364459 100644
--- a/api/symbols/KJUR.asn1.ocsp.OCSPResponse.html
+++ b/api/symbols/KJUR.asn1.ocsp.OCSPResponse.html
@@ -487,8 +487,6 @@
Classes
KJUR.crypto
-
KJUR.crypto.Cipher
-
KJUR.crypto.DSA
KJUR.crypto.ECDSA
diff --git a/api/symbols/KJUR.asn1.ocsp.OCSPUtil.html b/api/symbols/KJUR.asn1.ocsp.OCSPUtil.html
index 6a822b42..f725e943 100644
--- a/api/symbols/KJUR.asn1.ocsp.OCSPUtil.html
+++ b/api/symbols/KJUR.asn1.ocsp.OCSPUtil.html
@@ -487,8 +487,6 @@
Classes
KJUR.crypto
-
KJUR.crypto.Cipher
-
KJUR.crypto.DSA
KJUR.crypto.ECDSA
diff --git a/api/symbols/KJUR.asn1.ocsp.Request.html b/api/symbols/KJUR.asn1.ocsp.Request.html
index 88d5f1dc..f3737006 100644
--- a/api/symbols/KJUR.asn1.ocsp.Request.html
+++ b/api/symbols/KJUR.asn1.ocsp.Request.html
@@ -487,8 +487,6 @@
Classes
KJUR.crypto
-
KJUR.crypto.Cipher
-
KJUR.crypto.DSA
KJUR.crypto.ECDSA
diff --git a/api/symbols/KJUR.asn1.ocsp.ResponderID.html b/api/symbols/KJUR.asn1.ocsp.ResponderID.html
index 309f6ace..98f9d9af 100644
--- a/api/symbols/KJUR.asn1.ocsp.ResponderID.html
+++ b/api/symbols/KJUR.asn1.ocsp.ResponderID.html
@@ -487,8 +487,6 @@
Classes
KJUR.crypto
-
KJUR.crypto.Cipher
-
KJUR.crypto.DSA
KJUR.crypto.ECDSA
diff --git a/api/symbols/KJUR.asn1.ocsp.ResponseBytes.html b/api/symbols/KJUR.asn1.ocsp.ResponseBytes.html
index 39561c40..e1e38296 100644
--- a/api/symbols/KJUR.asn1.ocsp.ResponseBytes.html
+++ b/api/symbols/KJUR.asn1.ocsp.ResponseBytes.html
@@ -487,8 +487,6 @@
Classes
KJUR.crypto
-
KJUR.crypto.Cipher
-
KJUR.crypto.DSA
KJUR.crypto.ECDSA
diff --git a/api/symbols/KJUR.asn1.ocsp.ResponseData.html b/api/symbols/KJUR.asn1.ocsp.ResponseData.html
index 17c50fa1..94caf0fc 100644
--- a/api/symbols/KJUR.asn1.ocsp.ResponseData.html
+++ b/api/symbols/KJUR.asn1.ocsp.ResponseData.html
@@ -487,8 +487,6 @@
Classes
KJUR.crypto
-
KJUR.crypto.Cipher
-
KJUR.crypto.DSA
KJUR.crypto.ECDSA
diff --git a/api/symbols/KJUR.asn1.ocsp.SingleResponse.html b/api/symbols/KJUR.asn1.ocsp.SingleResponse.html
index 98dfce1e..e9155e9e 100644
--- a/api/symbols/KJUR.asn1.ocsp.SingleResponse.html
+++ b/api/symbols/KJUR.asn1.ocsp.SingleResponse.html
@@ -487,8 +487,6 @@
Classes
KJUR.crypto
-
KJUR.crypto.Cipher
-
KJUR.crypto.DSA
KJUR.crypto.ECDSA
diff --git a/api/symbols/KJUR.asn1.ocsp.SingleResponseList.html b/api/symbols/KJUR.asn1.ocsp.SingleResponseList.html
index 0fd78fa1..2b47a02d 100644
--- a/api/symbols/KJUR.asn1.ocsp.SingleResponseList.html
+++ b/api/symbols/KJUR.asn1.ocsp.SingleResponseList.html
@@ -487,8 +487,6 @@
Classes
KJUR.crypto
-
KJUR.crypto.Cipher
-
KJUR.crypto.DSA
KJUR.crypto.ECDSA
diff --git a/api/symbols/KJUR.asn1.ocsp.TBSRequest.html b/api/symbols/KJUR.asn1.ocsp.TBSRequest.html
index a29c847c..fa1c6df2 100644
--- a/api/symbols/KJUR.asn1.ocsp.TBSRequest.html
+++ b/api/symbols/KJUR.asn1.ocsp.TBSRequest.html
@@ -487,8 +487,6 @@
Classes
KJUR.crypto
-
KJUR.crypto.Cipher
-
KJUR.crypto.DSA
KJUR.crypto.ECDSA
diff --git a/api/symbols/KJUR.asn1.ocsp.html b/api/symbols/KJUR.asn1.ocsp.html
index 4a0aed9f..f3cec6c0 100644
--- a/api/symbols/KJUR.asn1.ocsp.html
+++ b/api/symbols/KJUR.asn1.ocsp.html
@@ -487,8 +487,6 @@
Classes
KJUR.crypto
-
KJUR.crypto.Cipher
-
KJUR.crypto.DSA
KJUR.crypto.ECDSA
diff --git a/api/symbols/KJUR.asn1.tsp.AbstractTSAAdapter.html b/api/symbols/KJUR.asn1.tsp.AbstractTSAAdapter.html
index 3e9c02b3..77a18d3a 100644
--- a/api/symbols/KJUR.asn1.tsp.AbstractTSAAdapter.html
+++ b/api/symbols/KJUR.asn1.tsp.AbstractTSAAdapter.html
@@ -487,8 +487,6 @@
Classes
KJUR.crypto
-
KJUR.crypto.Cipher
-
KJUR.crypto.DSA
KJUR.crypto.ECDSA
diff --git a/api/symbols/KJUR.asn1.tsp.Accuracy.html b/api/symbols/KJUR.asn1.tsp.Accuracy.html
index 35fdaa09..2eefa4ed 100644
--- a/api/symbols/KJUR.asn1.tsp.Accuracy.html
+++ b/api/symbols/KJUR.asn1.tsp.Accuracy.html
@@ -487,8 +487,6 @@
Classes
KJUR.crypto
-
KJUR.crypto.Cipher
-
KJUR.crypto.DSA
KJUR.crypto.ECDSA
diff --git a/api/symbols/KJUR.asn1.tsp.FixedTSAAdapter.html b/api/symbols/KJUR.asn1.tsp.FixedTSAAdapter.html
index 228ecc84..43e0a8c3 100644
--- a/api/symbols/KJUR.asn1.tsp.FixedTSAAdapter.html
+++ b/api/symbols/KJUR.asn1.tsp.FixedTSAAdapter.html
@@ -487,8 +487,6 @@
Classes
KJUR.crypto
-
KJUR.crypto.Cipher
-
KJUR.crypto.DSA
KJUR.crypto.ECDSA
diff --git a/api/symbols/KJUR.asn1.tsp.MessageImprint.html b/api/symbols/KJUR.asn1.tsp.MessageImprint.html
index 2b3f64d3..8d92b707 100644
--- a/api/symbols/KJUR.asn1.tsp.MessageImprint.html
+++ b/api/symbols/KJUR.asn1.tsp.MessageImprint.html
@@ -487,8 +487,6 @@
Classes
KJUR.crypto
-
KJUR.crypto.Cipher
-
KJUR.crypto.DSA
KJUR.crypto.ECDSA
diff --git a/api/symbols/KJUR.asn1.tsp.PKIFailureInfo.html b/api/symbols/KJUR.asn1.tsp.PKIFailureInfo.html
index c9c29ca7..f0ddfd52 100644
--- a/api/symbols/KJUR.asn1.tsp.PKIFailureInfo.html
+++ b/api/symbols/KJUR.asn1.tsp.PKIFailureInfo.html
@@ -487,8 +487,6 @@
Classes
KJUR.crypto
-
KJUR.crypto.Cipher
-
KJUR.crypto.DSA
KJUR.crypto.ECDSA
diff --git a/api/symbols/KJUR.asn1.tsp.PKIFreeText.html b/api/symbols/KJUR.asn1.tsp.PKIFreeText.html
index a01f6034..94cfc2c0 100644
--- a/api/symbols/KJUR.asn1.tsp.PKIFreeText.html
+++ b/api/symbols/KJUR.asn1.tsp.PKIFreeText.html
@@ -487,8 +487,6 @@
Classes
KJUR.crypto
-
KJUR.crypto.Cipher
-
KJUR.crypto.DSA
KJUR.crypto.ECDSA
diff --git a/api/symbols/KJUR.asn1.tsp.PKIStatus.html b/api/symbols/KJUR.asn1.tsp.PKIStatus.html
index 51989cd1..5c42caf0 100644
--- a/api/symbols/KJUR.asn1.tsp.PKIStatus.html
+++ b/api/symbols/KJUR.asn1.tsp.PKIStatus.html
@@ -487,8 +487,6 @@
Classes
KJUR.crypto
-
KJUR.crypto.Cipher
-
KJUR.crypto.DSA
KJUR.crypto.ECDSA
diff --git a/api/symbols/KJUR.asn1.tsp.PKIStatusInfo.html b/api/symbols/KJUR.asn1.tsp.PKIStatusInfo.html
index e417a1ee..997811f5 100644
--- a/api/symbols/KJUR.asn1.tsp.PKIStatusInfo.html
+++ b/api/symbols/KJUR.asn1.tsp.PKIStatusInfo.html
@@ -487,8 +487,6 @@
Classes
KJUR.crypto
-
KJUR.crypto.Cipher
-
KJUR.crypto.DSA
KJUR.crypto.ECDSA
diff --git a/api/symbols/KJUR.asn1.tsp.SimpleTSAAdapter.html b/api/symbols/KJUR.asn1.tsp.SimpleTSAAdapter.html
index 35ab5002..c1c1d015 100644
--- a/api/symbols/KJUR.asn1.tsp.SimpleTSAAdapter.html
+++ b/api/symbols/KJUR.asn1.tsp.SimpleTSAAdapter.html
@@ -487,8 +487,6 @@
Classes
KJUR.crypto
-
KJUR.crypto.Cipher
-
KJUR.crypto.DSA
KJUR.crypto.ECDSA
diff --git a/api/symbols/KJUR.asn1.tsp.TSPParser.html b/api/symbols/KJUR.asn1.tsp.TSPParser.html
index f0fb701e..5c5af127 100644
--- a/api/symbols/KJUR.asn1.tsp.TSPParser.html
+++ b/api/symbols/KJUR.asn1.tsp.TSPParser.html
@@ -487,8 +487,6 @@
Classes
KJUR.crypto
-
KJUR.crypto.Cipher
-
KJUR.crypto.DSA
KJUR.crypto.ECDSA
diff --git a/api/symbols/KJUR.asn1.tsp.TSPUtil.html b/api/symbols/KJUR.asn1.tsp.TSPUtil.html
index 78e91ba7..b153825e 100644
--- a/api/symbols/KJUR.asn1.tsp.TSPUtil.html
+++ b/api/symbols/KJUR.asn1.tsp.TSPUtil.html
@@ -487,8 +487,6 @@
Classes
KJUR.crypto
-
KJUR.crypto.Cipher
-
KJUR.crypto.DSA
KJUR.crypto.ECDSA
diff --git a/api/symbols/KJUR.asn1.tsp.TSTInfo.html b/api/symbols/KJUR.asn1.tsp.TSTInfo.html
index 7cbef111..4e7e5b54 100644
--- a/api/symbols/KJUR.asn1.tsp.TSTInfo.html
+++ b/api/symbols/KJUR.asn1.tsp.TSTInfo.html
@@ -487,8 +487,6 @@
Classes
KJUR.crypto
-
KJUR.crypto.Cipher
-
KJUR.crypto.DSA
KJUR.crypto.ECDSA
diff --git a/api/symbols/KJUR.asn1.tsp.TimeStampReq.html b/api/symbols/KJUR.asn1.tsp.TimeStampReq.html
index 492d54e6..e23f1016 100644
--- a/api/symbols/KJUR.asn1.tsp.TimeStampReq.html
+++ b/api/symbols/KJUR.asn1.tsp.TimeStampReq.html
@@ -487,8 +487,6 @@
Classes
KJUR.crypto
-
KJUR.crypto.Cipher
-
KJUR.crypto.DSA
KJUR.crypto.ECDSA
diff --git a/api/symbols/KJUR.asn1.tsp.TimeStampResp.html b/api/symbols/KJUR.asn1.tsp.TimeStampResp.html
index 4f98f705..27718fc2 100644
--- a/api/symbols/KJUR.asn1.tsp.TimeStampResp.html
+++ b/api/symbols/KJUR.asn1.tsp.TimeStampResp.html
@@ -487,8 +487,6 @@
Classes
KJUR.crypto
-
KJUR.crypto.Cipher
-
KJUR.crypto.DSA
KJUR.crypto.ECDSA
diff --git a/api/symbols/KJUR.asn1.tsp.TimeStampToken.html b/api/symbols/KJUR.asn1.tsp.TimeStampToken.html
index 53c2626f..f0d09f64 100644
--- a/api/symbols/KJUR.asn1.tsp.TimeStampToken.html
+++ b/api/symbols/KJUR.asn1.tsp.TimeStampToken.html
@@ -487,8 +487,6 @@
Classes
KJUR.crypto
-
KJUR.crypto.Cipher
-
KJUR.crypto.DSA
KJUR.crypto.ECDSA
diff --git a/api/symbols/KJUR.asn1.tsp.html b/api/symbols/KJUR.asn1.tsp.html
index 2b5e9a80..d930dc2e 100644
--- a/api/symbols/KJUR.asn1.tsp.html
+++ b/api/symbols/KJUR.asn1.tsp.html
@@ -487,8 +487,6 @@
Classes
KJUR.crypto
-
KJUR.crypto.Cipher
-
KJUR.crypto.DSA
KJUR.crypto.ECDSA
diff --git a/api/symbols/KJUR.asn1.x509.AdobeTimeStamp.html b/api/symbols/KJUR.asn1.x509.AdobeTimeStamp.html
index 7b57f7fc..bd1d9cd4 100644
--- a/api/symbols/KJUR.asn1.x509.AdobeTimeStamp.html
+++ b/api/symbols/KJUR.asn1.x509.AdobeTimeStamp.html
@@ -487,8 +487,6 @@
Classes
KJUR.crypto
-
KJUR.crypto.Cipher
-
KJUR.crypto.DSA
KJUR.crypto.ECDSA
diff --git a/api/symbols/KJUR.asn1.x509.AlgorithmIdentifier.html b/api/symbols/KJUR.asn1.x509.AlgorithmIdentifier.html
index 387667c8..2fa86e55 100644
--- a/api/symbols/KJUR.asn1.x509.AlgorithmIdentifier.html
+++ b/api/symbols/KJUR.asn1.x509.AlgorithmIdentifier.html
@@ -487,8 +487,6 @@
Classes
KJUR.crypto
-
KJUR.crypto.Cipher
-
KJUR.crypto.DSA
KJUR.crypto.ECDSA
diff --git a/api/symbols/KJUR.asn1.x509.AttributeTypeAndValue.html b/api/symbols/KJUR.asn1.x509.AttributeTypeAndValue.html
index 7dfe09f8..116d4f1a 100644
--- a/api/symbols/KJUR.asn1.x509.AttributeTypeAndValue.html
+++ b/api/symbols/KJUR.asn1.x509.AttributeTypeAndValue.html
@@ -487,8 +487,6 @@
Classes
KJUR.crypto
-
KJUR.crypto.Cipher
-
KJUR.crypto.DSA
KJUR.crypto.ECDSA
diff --git a/api/symbols/KJUR.asn1.x509.AuthorityInfoAccess.html b/api/symbols/KJUR.asn1.x509.AuthorityInfoAccess.html
index 8e349cab..59af4761 100644
--- a/api/symbols/KJUR.asn1.x509.AuthorityInfoAccess.html
+++ b/api/symbols/KJUR.asn1.x509.AuthorityInfoAccess.html
@@ -487,8 +487,6 @@
Classes
KJUR.crypto
-
KJUR.crypto.Cipher
-
KJUR.crypto.DSA
KJUR.crypto.ECDSA
diff --git a/api/symbols/KJUR.asn1.x509.AuthorityKeyIdentifier.html b/api/symbols/KJUR.asn1.x509.AuthorityKeyIdentifier.html
index 8429108e..bb0d375d 100644
--- a/api/symbols/KJUR.asn1.x509.AuthorityKeyIdentifier.html
+++ b/api/symbols/KJUR.asn1.x509.AuthorityKeyIdentifier.html
@@ -487,8 +487,6 @@
Classes
KJUR.crypto
-
KJUR.crypto.Cipher
-
KJUR.crypto.DSA
KJUR.crypto.ECDSA
diff --git a/api/symbols/KJUR.asn1.x509.BasicConstraints.html b/api/symbols/KJUR.asn1.x509.BasicConstraints.html
index a03ea688..68cad473 100644
--- a/api/symbols/KJUR.asn1.x509.BasicConstraints.html
+++ b/api/symbols/KJUR.asn1.x509.BasicConstraints.html
@@ -487,8 +487,6 @@
Classes
KJUR.crypto
-
KJUR.crypto.Cipher
-
KJUR.crypto.DSA
KJUR.crypto.ECDSA
diff --git a/api/symbols/KJUR.asn1.x509.CRL.html b/api/symbols/KJUR.asn1.x509.CRL.html
index e1db2acc..8682b33f 100644
--- a/api/symbols/KJUR.asn1.x509.CRL.html
+++ b/api/symbols/KJUR.asn1.x509.CRL.html
@@ -487,8 +487,6 @@
Classes
KJUR.crypto
-
KJUR.crypto.Cipher
-
KJUR.crypto.DSA
KJUR.crypto.ECDSA
diff --git a/api/symbols/KJUR.asn1.x509.CRLDistributionPoints.html b/api/symbols/KJUR.asn1.x509.CRLDistributionPoints.html
index 24791da6..101c6ffb 100644
--- a/api/symbols/KJUR.asn1.x509.CRLDistributionPoints.html
+++ b/api/symbols/KJUR.asn1.x509.CRLDistributionPoints.html
@@ -487,8 +487,6 @@
Classes
KJUR.crypto
-
KJUR.crypto.Cipher
-
KJUR.crypto.DSA
KJUR.crypto.ECDSA
diff --git a/api/symbols/KJUR.asn1.x509.CRLEntry.html b/api/symbols/KJUR.asn1.x509.CRLEntry.html
index 1b1dac8d..7781c8bb 100644
--- a/api/symbols/KJUR.asn1.x509.CRLEntry.html
+++ b/api/symbols/KJUR.asn1.x509.CRLEntry.html
@@ -487,8 +487,6 @@
Classes
KJUR.crypto
-
KJUR.crypto.Cipher
-
KJUR.crypto.DSA
KJUR.crypto.ECDSA
diff --git a/api/symbols/KJUR.asn1.x509.CRLNumber.html b/api/symbols/KJUR.asn1.x509.CRLNumber.html
index 9b81c380..dd01bb9d 100644
--- a/api/symbols/KJUR.asn1.x509.CRLNumber.html
+++ b/api/symbols/KJUR.asn1.x509.CRLNumber.html
@@ -487,8 +487,6 @@
Classes
KJUR.crypto
-
KJUR.crypto.Cipher
-
KJUR.crypto.DSA
KJUR.crypto.ECDSA
diff --git a/api/symbols/KJUR.asn1.x509.CRLReason.html b/api/symbols/KJUR.asn1.x509.CRLReason.html
index 0fbcde52..1501ba40 100644
--- a/api/symbols/KJUR.asn1.x509.CRLReason.html
+++ b/api/symbols/KJUR.asn1.x509.CRLReason.html
@@ -487,8 +487,6 @@
Classes
KJUR.crypto
-
KJUR.crypto.Cipher
-
KJUR.crypto.DSA
KJUR.crypto.ECDSA
diff --git a/api/symbols/KJUR.asn1.x509.Certificate.html b/api/symbols/KJUR.asn1.x509.Certificate.html
index 216a60a9..51d9aafd 100644
--- a/api/symbols/KJUR.asn1.x509.Certificate.html
+++ b/api/symbols/KJUR.asn1.x509.Certificate.html
@@ -487,8 +487,6 @@
Classes
KJUR.crypto
-
KJUR.crypto.Cipher
-
KJUR.crypto.DSA
KJUR.crypto.ECDSA
diff --git a/api/symbols/KJUR.asn1.x509.CertificatePolicies.html b/api/symbols/KJUR.asn1.x509.CertificatePolicies.html
index fe9f3bd1..e9cf2649 100644
--- a/api/symbols/KJUR.asn1.x509.CertificatePolicies.html
+++ b/api/symbols/KJUR.asn1.x509.CertificatePolicies.html
@@ -487,8 +487,6 @@
Classes
KJUR.crypto
-
KJUR.crypto.Cipher
-
KJUR.crypto.DSA
KJUR.crypto.ECDSA
diff --git a/api/symbols/KJUR.asn1.x509.DisplayText.html b/api/symbols/KJUR.asn1.x509.DisplayText.html
index 6735bdf6..87ce2623 100644
--- a/api/symbols/KJUR.asn1.x509.DisplayText.html
+++ b/api/symbols/KJUR.asn1.x509.DisplayText.html
@@ -487,8 +487,6 @@
Classes
KJUR.crypto
-
KJUR.crypto.Cipher
-
KJUR.crypto.DSA
KJUR.crypto.ECDSA
diff --git a/api/symbols/KJUR.asn1.x509.DistributionPoint.html b/api/symbols/KJUR.asn1.x509.DistributionPoint.html
index fe121f87..31157d9e 100644
--- a/api/symbols/KJUR.asn1.x509.DistributionPoint.html
+++ b/api/symbols/KJUR.asn1.x509.DistributionPoint.html
@@ -487,8 +487,6 @@
Classes
KJUR.crypto
-
KJUR.crypto.Cipher
-
KJUR.crypto.DSA
KJUR.crypto.ECDSA
diff --git a/api/symbols/KJUR.asn1.x509.DistributionPointName.html b/api/symbols/KJUR.asn1.x509.DistributionPointName.html
index c2929c11..33ea845a 100644
--- a/api/symbols/KJUR.asn1.x509.DistributionPointName.html
+++ b/api/symbols/KJUR.asn1.x509.DistributionPointName.html
@@ -487,8 +487,6 @@
Classes
KJUR.crypto
-
KJUR.crypto.Cipher
-
KJUR.crypto.DSA
KJUR.crypto.ECDSA
diff --git a/api/symbols/KJUR.asn1.x509.ExtKeyUsage.html b/api/symbols/KJUR.asn1.x509.ExtKeyUsage.html
index e229283e..b7ddd8d0 100644
--- a/api/symbols/KJUR.asn1.x509.ExtKeyUsage.html
+++ b/api/symbols/KJUR.asn1.x509.ExtKeyUsage.html
@@ -487,8 +487,6 @@
Classes
KJUR.crypto
-
KJUR.crypto.Cipher
-
KJUR.crypto.DSA
KJUR.crypto.ECDSA
diff --git a/api/symbols/KJUR.asn1.x509.Extension.html b/api/symbols/KJUR.asn1.x509.Extension.html
index 2d837ce0..211bcc17 100644
--- a/api/symbols/KJUR.asn1.x509.Extension.html
+++ b/api/symbols/KJUR.asn1.x509.Extension.html
@@ -487,8 +487,6 @@
Classes
KJUR.crypto
-
KJUR.crypto.Cipher
-
KJUR.crypto.DSA
KJUR.crypto.ECDSA
diff --git a/api/symbols/KJUR.asn1.x509.Extensions.html b/api/symbols/KJUR.asn1.x509.Extensions.html
index bd41ab65..8bfb2138 100644
--- a/api/symbols/KJUR.asn1.x509.Extensions.html
+++ b/api/symbols/KJUR.asn1.x509.Extensions.html
@@ -487,8 +487,6 @@
Classes
KJUR.crypto
-
KJUR.crypto.Cipher
-
KJUR.crypto.DSA
KJUR.crypto.ECDSA
diff --git a/api/symbols/KJUR.asn1.x509.GeneralName.html b/api/symbols/KJUR.asn1.x509.GeneralName.html
index 9a3a5807..4e189bd5 100644
--- a/api/symbols/KJUR.asn1.x509.GeneralName.html
+++ b/api/symbols/KJUR.asn1.x509.GeneralName.html
@@ -487,8 +487,6 @@
Classes
KJUR.crypto
-
KJUR.crypto.Cipher
-
KJUR.crypto.DSA
KJUR.crypto.ECDSA
diff --git a/api/symbols/KJUR.asn1.x509.GeneralNames.html b/api/symbols/KJUR.asn1.x509.GeneralNames.html
index ddc0ebcc..eb29a662 100644
--- a/api/symbols/KJUR.asn1.x509.GeneralNames.html
+++ b/api/symbols/KJUR.asn1.x509.GeneralNames.html
@@ -487,8 +487,6 @@
Classes
KJUR.crypto
-
KJUR.crypto.Cipher
-
KJUR.crypto.DSA
KJUR.crypto.ECDSA
diff --git a/api/symbols/KJUR.asn1.x509.GeneralSubtree.html b/api/symbols/KJUR.asn1.x509.GeneralSubtree.html
index 99cad791..a97ee340 100644
--- a/api/symbols/KJUR.asn1.x509.GeneralSubtree.html
+++ b/api/symbols/KJUR.asn1.x509.GeneralSubtree.html
@@ -487,8 +487,6 @@
Classes
KJUR.crypto
-
KJUR.crypto.Cipher
-
KJUR.crypto.DSA
KJUR.crypto.ECDSA
diff --git a/api/symbols/KJUR.asn1.x509.InhibitAnyPolicy.html b/api/symbols/KJUR.asn1.x509.InhibitAnyPolicy.html
index 6b383bcb..d94cec21 100644
--- a/api/symbols/KJUR.asn1.x509.InhibitAnyPolicy.html
+++ b/api/symbols/KJUR.asn1.x509.InhibitAnyPolicy.html
@@ -487,8 +487,6 @@
Classes
KJUR.crypto
-
KJUR.crypto.Cipher
-
KJUR.crypto.DSA
KJUR.crypto.ECDSA
diff --git a/api/symbols/KJUR.asn1.x509.IssuerAltName.html b/api/symbols/KJUR.asn1.x509.IssuerAltName.html
index 65fffe1a..f89d6f20 100644
--- a/api/symbols/KJUR.asn1.x509.IssuerAltName.html
+++ b/api/symbols/KJUR.asn1.x509.IssuerAltName.html
@@ -487,8 +487,6 @@
Classes
KJUR.crypto
-
KJUR.crypto.Cipher
-
KJUR.crypto.DSA
KJUR.crypto.ECDSA
diff --git a/api/symbols/KJUR.asn1.x509.KeyUsage.html b/api/symbols/KJUR.asn1.x509.KeyUsage.html
index face1ecc..955ac8af 100644
--- a/api/symbols/KJUR.asn1.x509.KeyUsage.html
+++ b/api/symbols/KJUR.asn1.x509.KeyUsage.html
@@ -487,8 +487,6 @@
Classes
KJUR.crypto
-
KJUR.crypto.Cipher
-
KJUR.crypto.DSA
KJUR.crypto.ECDSA
diff --git a/api/symbols/KJUR.asn1.x509.NameConstraints.html b/api/symbols/KJUR.asn1.x509.NameConstraints.html
index ab848b1b..735ab8b4 100644
--- a/api/symbols/KJUR.asn1.x509.NameConstraints.html
+++ b/api/symbols/KJUR.asn1.x509.NameConstraints.html
@@ -487,8 +487,6 @@
Classes
KJUR.crypto
-
KJUR.crypto.Cipher
-
KJUR.crypto.DSA
KJUR.crypto.ECDSA
diff --git a/api/symbols/KJUR.asn1.x509.NoticeReference.html b/api/symbols/KJUR.asn1.x509.NoticeReference.html
index 7ee206ba..31dad7a3 100644
--- a/api/symbols/KJUR.asn1.x509.NoticeReference.html
+++ b/api/symbols/KJUR.asn1.x509.NoticeReference.html
@@ -487,8 +487,6 @@
Classes
KJUR.crypto
-
KJUR.crypto.Cipher
-
KJUR.crypto.DSA
KJUR.crypto.ECDSA
diff --git a/api/symbols/KJUR.asn1.x509.OCSPNoCheck.html b/api/symbols/KJUR.asn1.x509.OCSPNoCheck.html
index 0802c678..0772340f 100644
--- a/api/symbols/KJUR.asn1.x509.OCSPNoCheck.html
+++ b/api/symbols/KJUR.asn1.x509.OCSPNoCheck.html
@@ -487,8 +487,6 @@
Classes
KJUR.crypto
-
KJUR.crypto.Cipher
-
KJUR.crypto.DSA
KJUR.crypto.ECDSA
diff --git a/api/symbols/KJUR.asn1.x509.OCSPNonce.html b/api/symbols/KJUR.asn1.x509.OCSPNonce.html
index 506f62f9..05efd8fd 100644
--- a/api/symbols/KJUR.asn1.x509.OCSPNonce.html
+++ b/api/symbols/KJUR.asn1.x509.OCSPNonce.html
@@ -487,8 +487,6 @@
Classes
KJUR.crypto
-
KJUR.crypto.Cipher
-
KJUR.crypto.DSA
KJUR.crypto.ECDSA
diff --git a/api/symbols/KJUR.asn1.x509.OID.html b/api/symbols/KJUR.asn1.x509.OID.html
index 13f66bcb..e45bdbde 100644
--- a/api/symbols/KJUR.asn1.x509.OID.html
+++ b/api/symbols/KJUR.asn1.x509.OID.html
@@ -487,8 +487,6 @@
Classes
KJUR.crypto
-
KJUR.crypto.Cipher
-
KJUR.crypto.DSA
KJUR.crypto.ECDSA
diff --git a/api/symbols/KJUR.asn1.x509.OtherName.html b/api/symbols/KJUR.asn1.x509.OtherName.html
index e79605b4..2f3b359b 100644
--- a/api/symbols/KJUR.asn1.x509.OtherName.html
+++ b/api/symbols/KJUR.asn1.x509.OtherName.html
@@ -487,8 +487,6 @@
Classes
KJUR.crypto
-
KJUR.crypto.Cipher
-
KJUR.crypto.DSA
KJUR.crypto.ECDSA
diff --git a/api/symbols/KJUR.asn1.x509.PolicyConstraints.html b/api/symbols/KJUR.asn1.x509.PolicyConstraints.html
index 9824b866..ddeaa685 100644
--- a/api/symbols/KJUR.asn1.x509.PolicyConstraints.html
+++ b/api/symbols/KJUR.asn1.x509.PolicyConstraints.html
@@ -487,8 +487,6 @@
Classes
KJUR.crypto
-
KJUR.crypto.Cipher
-
KJUR.crypto.DSA
KJUR.crypto.ECDSA
diff --git a/api/symbols/KJUR.asn1.x509.PolicyInformation.html b/api/symbols/KJUR.asn1.x509.PolicyInformation.html
index 3394e90f..9a2c4c9f 100644
--- a/api/symbols/KJUR.asn1.x509.PolicyInformation.html
+++ b/api/symbols/KJUR.asn1.x509.PolicyInformation.html
@@ -487,8 +487,6 @@
Classes
KJUR.crypto
-
KJUR.crypto.Cipher
-
KJUR.crypto.DSA
KJUR.crypto.ECDSA
diff --git a/api/symbols/KJUR.asn1.x509.PolicyMappings.html b/api/symbols/KJUR.asn1.x509.PolicyMappings.html
index 1ef6e9ed..51802a28 100644
--- a/api/symbols/KJUR.asn1.x509.PolicyMappings.html
+++ b/api/symbols/KJUR.asn1.x509.PolicyMappings.html
@@ -487,8 +487,6 @@
Classes
KJUR.crypto
-
KJUR.crypto.Cipher
-
KJUR.crypto.DSA
KJUR.crypto.ECDSA
diff --git a/api/symbols/KJUR.asn1.x509.PolicyQualifierInfo.html b/api/symbols/KJUR.asn1.x509.PolicyQualifierInfo.html
index 7f8e9a90..4b1f8d49 100644
--- a/api/symbols/KJUR.asn1.x509.PolicyQualifierInfo.html
+++ b/api/symbols/KJUR.asn1.x509.PolicyQualifierInfo.html
@@ -487,8 +487,6 @@
Classes
KJUR.crypto
-
KJUR.crypto.Cipher
-
KJUR.crypto.DSA
KJUR.crypto.ECDSA
diff --git a/api/symbols/KJUR.asn1.x509.PrivateExtension.html b/api/symbols/KJUR.asn1.x509.PrivateExtension.html
index 42aeb00d..bb1cd2db 100644
--- a/api/symbols/KJUR.asn1.x509.PrivateExtension.html
+++ b/api/symbols/KJUR.asn1.x509.PrivateExtension.html
@@ -487,8 +487,6 @@
Classes
KJUR.crypto
-
KJUR.crypto.Cipher
-
KJUR.crypto.DSA
KJUR.crypto.ECDSA
diff --git a/api/symbols/KJUR.asn1.x509.RDN.html b/api/symbols/KJUR.asn1.x509.RDN.html
index 5c1edb1e..86763171 100644
--- a/api/symbols/KJUR.asn1.x509.RDN.html
+++ b/api/symbols/KJUR.asn1.x509.RDN.html
@@ -487,8 +487,6 @@
Classes
KJUR.crypto
-
KJUR.crypto.Cipher
-
KJUR.crypto.DSA
KJUR.crypto.ECDSA
diff --git a/api/symbols/KJUR.asn1.x509.SubjectAltName.html b/api/symbols/KJUR.asn1.x509.SubjectAltName.html
index 78e71eb0..c8992eb1 100644
--- a/api/symbols/KJUR.asn1.x509.SubjectAltName.html
+++ b/api/symbols/KJUR.asn1.x509.SubjectAltName.html
@@ -487,8 +487,6 @@
Classes
KJUR.crypto
-
KJUR.crypto.Cipher
-
KJUR.crypto.DSA
KJUR.crypto.ECDSA
diff --git a/api/symbols/KJUR.asn1.x509.SubjectDirectoryAttributes.html b/api/symbols/KJUR.asn1.x509.SubjectDirectoryAttributes.html
index 5736bb65..0d2e865e 100644
--- a/api/symbols/KJUR.asn1.x509.SubjectDirectoryAttributes.html
+++ b/api/symbols/KJUR.asn1.x509.SubjectDirectoryAttributes.html
@@ -487,8 +487,6 @@
Classes
KJUR.crypto
-
KJUR.crypto.Cipher
-
KJUR.crypto.DSA
KJUR.crypto.ECDSA
diff --git a/api/symbols/KJUR.asn1.x509.SubjectKeyIdentifier.html b/api/symbols/KJUR.asn1.x509.SubjectKeyIdentifier.html
index b5ac3c67..5ade025f 100644
--- a/api/symbols/KJUR.asn1.x509.SubjectKeyIdentifier.html
+++ b/api/symbols/KJUR.asn1.x509.SubjectKeyIdentifier.html
@@ -487,8 +487,6 @@
Classes
KJUR.crypto
-
KJUR.crypto.Cipher
-
KJUR.crypto.DSA
KJUR.crypto.ECDSA
diff --git a/api/symbols/KJUR.asn1.x509.SubjectPublicKeyInfo.html b/api/symbols/KJUR.asn1.x509.SubjectPublicKeyInfo.html
index 613aaf37..80077849 100644
--- a/api/symbols/KJUR.asn1.x509.SubjectPublicKeyInfo.html
+++ b/api/symbols/KJUR.asn1.x509.SubjectPublicKeyInfo.html
@@ -487,8 +487,6 @@
Classes
KJUR.crypto
-
KJUR.crypto.Cipher
-
KJUR.crypto.DSA
KJUR.crypto.ECDSA
diff --git a/api/symbols/KJUR.asn1.x509.TBSCertList.html b/api/symbols/KJUR.asn1.x509.TBSCertList.html
index 6b8e4bd7..9a3faf0b 100644
--- a/api/symbols/KJUR.asn1.x509.TBSCertList.html
+++ b/api/symbols/KJUR.asn1.x509.TBSCertList.html
@@ -487,8 +487,6 @@
Classes
KJUR.crypto
-
KJUR.crypto.Cipher
-
KJUR.crypto.DSA
KJUR.crypto.ECDSA
diff --git a/api/symbols/KJUR.asn1.x509.TBSCertificate.html b/api/symbols/KJUR.asn1.x509.TBSCertificate.html
index a86f487e..94e673c5 100644
--- a/api/symbols/KJUR.asn1.x509.TBSCertificate.html
+++ b/api/symbols/KJUR.asn1.x509.TBSCertificate.html
@@ -487,8 +487,6 @@
Classes
KJUR.crypto
-
KJUR.crypto.Cipher
-
KJUR.crypto.DSA
KJUR.crypto.ECDSA
diff --git a/api/symbols/KJUR.asn1.x509.Time.html b/api/symbols/KJUR.asn1.x509.Time.html
index 5a836862..ce31ce96 100644
--- a/api/symbols/KJUR.asn1.x509.Time.html
+++ b/api/symbols/KJUR.asn1.x509.Time.html
@@ -487,8 +487,6 @@
Classes
KJUR.crypto
-
KJUR.crypto.Cipher
-
KJUR.crypto.DSA
KJUR.crypto.ECDSA
diff --git a/api/symbols/KJUR.asn1.x509.UserNotice.html b/api/symbols/KJUR.asn1.x509.UserNotice.html
index beb7d933..8e64de58 100644
--- a/api/symbols/KJUR.asn1.x509.UserNotice.html
+++ b/api/symbols/KJUR.asn1.x509.UserNotice.html
@@ -487,8 +487,6 @@
Classes
KJUR.crypto
-
KJUR.crypto.Cipher
-
KJUR.crypto.DSA
KJUR.crypto.ECDSA
diff --git a/api/symbols/KJUR.asn1.x509.X500Name.html b/api/symbols/KJUR.asn1.x509.X500Name.html
index 0a535c6d..ee6d69c2 100644
--- a/api/symbols/KJUR.asn1.x509.X500Name.html
+++ b/api/symbols/KJUR.asn1.x509.X500Name.html
@@ -487,8 +487,6 @@
Classes
KJUR.crypto
-
KJUR.crypto.Cipher
-
KJUR.crypto.DSA
KJUR.crypto.ECDSA
diff --git a/api/symbols/KJUR.asn1.x509.X509Util.html b/api/symbols/KJUR.asn1.x509.X509Util.html
index 6f2a688c..3ecb3e1a 100644
--- a/api/symbols/KJUR.asn1.x509.X509Util.html
+++ b/api/symbols/KJUR.asn1.x509.X509Util.html
@@ -487,8 +487,6 @@
Classes
KJUR.crypto
-
KJUR.crypto.Cipher
-
KJUR.crypto.DSA
KJUR.crypto.ECDSA
diff --git a/api/symbols/KJUR.asn1.x509.html b/api/symbols/KJUR.asn1.x509.html
index 7f34333b..63a1d1a3 100644
--- a/api/symbols/KJUR.asn1.x509.html
+++ b/api/symbols/KJUR.asn1.x509.html
@@ -487,8 +487,6 @@
Classes
KJUR.crypto
-
KJUR.crypto.Cipher
-
KJUR.crypto.DSA
KJUR.crypto.ECDSA
diff --git a/api/symbols/KJUR.crypto.Cipher.html b/api/symbols/KJUR.crypto.Cipher.html
deleted file mode 100644
index 526c754f..00000000
--- a/api/symbols/KJUR.crypto.Cipher.html
+++ /dev/null
@@ -1,966 +0,0 @@
-
-
-
-
-
-
-
jsrsasign JavaScript API Reference - KJUR.crypto.Cipher
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Class KJUR.crypto.Cipher
-
-
-
-
-
-
-
- Cipher class to encrypt and decrypt data
-
-
-
Defined in: crypto-1.1.js.
-
-
-
-
-
-
- Class Summary
-
-
- Constructor Attributes |
- Constructor Name and Description |
-
-
-
-
- |
-
-
- Cipher class to encrypt and decrypt data
-Here is supported canonicalized cipher algorithm names and its standard names:
-
-- RSA - RSA/ECB/PKCS1Padding (default for RSAKey)
-- RSAOAEP - RSA/ECB/OAEPWithSHA-1AndMGF1Padding
-- RSAOAEP224 - RSA/ECB/OAEPWithSHA-224AndMGF1Padding(*)
-- RSAOAEP256 - RSA/ECB/OAEPWithSHA-256AndMGF1Padding
-- RSAOAEP384 - RSA/ECB/OAEPWithSHA-384AndMGF1Padding(*)
-- RSAOAEP512 - RSA/ECB/OAEPWithSHA-512AndMGF1Padding(*)
-
-NOTE: (*) is not supported in Java JCE.
- |
-
-
-
-
-
-
-
-
-
-
-
-
-
- Method Summary
-
-
- Method Attributes |
- Method Name and Description |
-
-
-
-
-
- <static> |
-
- KJUR.crypto.Cipher. decrypt(hex, keyObj, algName, param)
-
- decrypt encrypted hexadecimal string with specified key and algorithm
-This static method decrypts encrypted hexadecimal string with specified key and algorithm.
- |
-
-
-
- <static> |
-
- KJUR.crypto.Cipher. encrypt(s, keyObj, algName, param)
-
- encrypt raw string by specified key and algorithm
-This static method encrypts raw string with specified key and algorithm.
- |
-
-
-
- <static> |
-
-
- get canonicalized encrypt/decrypt algorithm name by key and short/long algorithm name
-Here is supported canonicalized cipher algorithm names and its standard names:
-
-- RSA - RSA/ECB/PKCS1Padding (default for RSAKey)
-- RSAOAEP - RSA/ECB/OAEPWithSHA-1AndMGF1Padding
-- RSAOAEP224 - RSA/ECB/OAEPWithSHA-224AndMGF1Padding(*)
-- RSAOAEP256 - RSA/ECB/OAEPWithSHA-256AndMGF1Padding
-- RSAOAEP384 - RSA/ECB/OAEPWithSHA-384AndMGF1Padding(*)
-- RSAOAEP512 - RSA/ECB/OAEPWithSHA-512AndMGF1Padding(*)
-
-NOTE: (*) is not supported in Java JCE.
- |
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Class Detail
-
-
-
- KJUR.crypto.Cipher(params)
-
-
-
- Cipher class to encrypt and decrypt data
-Here is supported canonicalized cipher algorithm names and its standard names:
-
-- RSA - RSA/ECB/PKCS1Padding (default for RSAKey)
-- RSAOAEP - RSA/ECB/OAEPWithSHA-1AndMGF1Padding
-- RSAOAEP224 - RSA/ECB/OAEPWithSHA-224AndMGF1Padding(*)
-- RSAOAEP256 - RSA/ECB/OAEPWithSHA-256AndMGF1Padding
-- RSAOAEP384 - RSA/ECB/OAEPWithSHA-384AndMGF1Padding(*)
-- RSAOAEP512 - RSA/ECB/OAEPWithSHA-512AndMGF1Padding(*)
-
-NOTE: (*) is not supported in Java JCE.
-Currently this class supports only RSA encryption and decryption
-based on RSAES-OAEP and RSAES-PKCS1-v1_5 scheme.
-However it is planning to implement also symmetric ciphers near in the future
-
-
-
-
-
-
-
-
- - Parameters:
-
- -
- {Array} params
-
-
- - parameters for constructor
-
-
-
-
-
-
- - Since:
- - jsrsasign 6.2.0 crypto 1.1.10
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Method Detail
-
-
-
-
<static>
-
- {String}
- KJUR.crypto.Cipher.decrypt(hex, keyObj, algName, param)
-
-
-
- decrypt encrypted hexadecimal string with specified key and algorithm
-This static method decrypts encrypted hexadecimal string with specified key and algorithm.
-
-NOTE: From jsrsasign 10.9.0, asymmetric cipher ({des-EDE3,aes{128,256}}-CBCis also supported.
-
-
-
-
-
-
-
-// asynchronous cipher
-KJUR.crypto.Cipher.decrypt("aaa", prvRSAKeyObj) → "1abc2d..."
-KJUR.crypto.Cipher.decrypt("aaa", prvRSAKeyObj, "RSAOAEP) → "23ab02..."
-// synchronous cipher
-KJUR.crypto.Cipher.decrypt("12abcd...", "5a7d...", "aes256-CBC", { iv: "1b3c..." })
-KJUR.crypto.Cipher.decrypt("12abcd...", "5a7d...", any, { encalg: "aes128-CBC", iv: "1b3c..." })
-KJUR.crypto.Cipher.decrypt("12abcd...", any, any, { encalg: "des-EDE3-CBC", iv: "1b3c...", key: "3d41..." })
-KJUR.crypto.Cipher.decrypt(any, any, any, { encalg: "des-EDE3-CBC", iv: "1b3c...", key: "3d41...", enc: "12abcd..." })
-
-
-
-
-
- - Parameters:
-
- -
- {string} hex
-
-
- - hexadecimal string of encrypted message
-
- -
- {object} keyObj
-
-
- - RSAKey object or hexadecimal string of symmetric cipher key
-
- -
- {string} algName
-
-
- - short/long algorithm name for encryption/decryption (OPTION)
-
- -
- {object} param
-
-
- - parameters for synchronous cipher such as initial vector (OPTION)
-
-
-
-
-
-
- - Since:
- - jsrsasign 6.2.0 crypto 1.1.10
-
-
-
-
-
-
- - Returns:
-
- - {String} decrypted raw string
-
-
-
-
-
-
-
-
-
-
<static>
-
- {String}
- KJUR.crypto.Cipher.encrypt(s, keyObj, algName, param)
-
-
-
- encrypt raw string by specified key and algorithm
-This static method encrypts raw string with specified key and algorithm.
-
-NOTE: From jsrsasign 10.9.0, asymmetric cipher ({des-EDE3,aes{128,256}}-CBC) is also supported.
-
-
-
-
-
-
-
-// asynchronous cipher
-KJUR.crypto.Cipher.encrypt("aaa", pubRSAKeyObj) → "1abc2d..."
-KJUR.crypto.Cipher.encrypt("aaa", pubRSAKeyObj, "RSAOAEP") → "23ab02..."
-// synchronous cipher
-KJUR.crypto.Cipher.encrypt("12abcd...", "5a7d...", "aes256-CBC", { iv: "1b3c..." })
-KJUR.crypto.Cipher.encrypt("12abcd...", "5a7d...", any, { encalg: "aes128-CBC", iv: "1b3c..." })
-KJUR.crypto.Cipher.encrypt("12abcd...", any, any, { encalg: "des-EDE3-CBC", iv: "1b3c...", key: "3d41..." })
-KJUR.crypto.Cipher.encrypt(any, any, any, { encalg: "des-EDE3-CBC", iv: "1b3c...", key: "3d41...", enc: "12abcd..." })
-
-
-
-
-
- - Parameters:
-
- -
- {String} s
-
-
- - input string to encrypt
-
- -
- {Object} keyObj
-
-
- - RSAKey object or hexadecimal string of symmetric cipher key
-
- -
- {String} algName
-
-
- - short/long algorithm name for encryption/decryption (OPTION)
-
- -
- {object} param
-
-
- - parameters for synchronous cipher such as initial vector (OPTION)
-
-
-
-
-
-
- - Since:
- - jsrsasign 6.2.0 crypto 1.1.10
-
-
-
-
-
-
- - Returns:
-
- - {String} hexadecimal encrypted string
-
-
-
-
-
-
-
-
-
-
<static>
-
- {String}
- KJUR.crypto.Cipher.getAlgByKeyAndName(keyObj, algName)
-
-
-
- get canonicalized encrypt/decrypt algorithm name by key and short/long algorithm name
-Here is supported canonicalized cipher algorithm names and its standard names:
-
-- RSA - RSA/ECB/PKCS1Padding (default for RSAKey)
-- RSAOAEP - RSA/ECB/OAEPWithSHA-1AndMGF1Padding
-- RSAOAEP224 - RSA/ECB/OAEPWithSHA-224AndMGF1Padding(*)
-- RSAOAEP256 - RSA/ECB/OAEPWithSHA-256AndMGF1Padding
-- RSAOAEP384 - RSA/ECB/OAEPWithSHA-384AndMGF1Padding(*)
-- RSAOAEP512 - RSA/ECB/OAEPWithSHA-512AndMGF1Padding(*)
-
-NOTE: (*) is not supported in Java JCE.
-
-
-
-
-
-
-
-KJUR.crypto.Cipher.getAlgByKeyAndName(objRSAKey) → "RSA"
-KJUR.crypto.Cipher.getAlgByKeyAndName(objRSAKey, "RSAOAEP") → "RSAOAEP"
-
-
-
-
-
- - Parameters:
-
- -
- {Object} keyObj
-
-
- - RSAKey object or hexadecimal string of symmetric cipher key
-
- -
- {String} algName
-
-
- - short/long algorithm name for encryption/decryption
-
-
-
-
-
-
- - Since:
- - jsrsasign 6.2.0 crypto 1.1.10
-
-
-
-
-
-
- - Returns:
-
- - {String} canonicalized algorithm name for encryption/decryption
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- © 2012-2023 Kenji Urushima, All rights reserved
-
- Documentation generated by
JsDoc Toolkit 2.4.0
-
-
-
diff --git a/api/symbols/KJUR.crypto.DSA.html b/api/symbols/KJUR.crypto.DSA.html
index 7763f0f4..80f5c7ae 100644
--- a/api/symbols/KJUR.crypto.DSA.html
+++ b/api/symbols/KJUR.crypto.DSA.html
@@ -487,8 +487,6 @@
Classes
KJUR.crypto
-
KJUR.crypto.Cipher
-
KJUR.crypto.DSA
KJUR.crypto.ECDSA
diff --git a/api/symbols/KJUR.crypto.ECDSA.html b/api/symbols/KJUR.crypto.ECDSA.html
index fc861071..02df9c8c 100644
--- a/api/symbols/KJUR.crypto.ECDSA.html
+++ b/api/symbols/KJUR.crypto.ECDSA.html
@@ -487,8 +487,6 @@
Classes
KJUR.crypto
-
KJUR.crypto.Cipher
-
KJUR.crypto.DSA
KJUR.crypto.ECDSA
diff --git a/api/symbols/KJUR.crypto.ECParameterDB.html b/api/symbols/KJUR.crypto.ECParameterDB.html
index a055c199..395a630f 100644
--- a/api/symbols/KJUR.crypto.ECParameterDB.html
+++ b/api/symbols/KJUR.crypto.ECParameterDB.html
@@ -487,8 +487,6 @@
Classes
KJUR.crypto
-
KJUR.crypto.Cipher
-
KJUR.crypto.DSA
KJUR.crypto.ECDSA
diff --git a/api/symbols/KJUR.crypto.Mac.html b/api/symbols/KJUR.crypto.Mac.html
index d723eb36..96a0d0b2 100644
--- a/api/symbols/KJUR.crypto.Mac.html
+++ b/api/symbols/KJUR.crypto.Mac.html
@@ -487,8 +487,6 @@
Classes
KJUR.crypto
-
KJUR.crypto.Cipher
-
KJUR.crypto.DSA
KJUR.crypto.ECDSA
diff --git a/api/symbols/KJUR.crypto.MessageDigest.html b/api/symbols/KJUR.crypto.MessageDigest.html
index 8dd35c87..21d156b3 100644
--- a/api/symbols/KJUR.crypto.MessageDigest.html
+++ b/api/symbols/KJUR.crypto.MessageDigest.html
@@ -487,8 +487,6 @@
Classes
KJUR.crypto
-
KJUR.crypto.Cipher
-
KJUR.crypto.DSA
KJUR.crypto.ECDSA
diff --git a/api/symbols/KJUR.crypto.OID.html b/api/symbols/KJUR.crypto.OID.html
index b9561679..e2ab0dcd 100644
--- a/api/symbols/KJUR.crypto.OID.html
+++ b/api/symbols/KJUR.crypto.OID.html
@@ -487,8 +487,6 @@
Classes
KJUR.crypto
-
KJUR.crypto.Cipher
-
KJUR.crypto.DSA
KJUR.crypto.ECDSA
diff --git a/api/symbols/KJUR.crypto.Signature.html b/api/symbols/KJUR.crypto.Signature.html
index c05d3ac6..c10115f9 100644
--- a/api/symbols/KJUR.crypto.Signature.html
+++ b/api/symbols/KJUR.crypto.Signature.html
@@ -487,8 +487,6 @@
Classes
KJUR.crypto
-
KJUR.crypto.Cipher
-
KJUR.crypto.DSA
KJUR.crypto.ECDSA
diff --git a/api/symbols/KJUR.crypto.Util.html b/api/symbols/KJUR.crypto.Util.html
index e7fc9e24..7ba6f275 100644
--- a/api/symbols/KJUR.crypto.Util.html
+++ b/api/symbols/KJUR.crypto.Util.html
@@ -487,8 +487,6 @@
Classes
KJUR.crypto
-
KJUR.crypto.Cipher
-
KJUR.crypto.DSA
KJUR.crypto.ECDSA
diff --git a/api/symbols/KJUR.crypto.html b/api/symbols/KJUR.crypto.html
index df3d1320..8fb16f96 100644
--- a/api/symbols/KJUR.crypto.html
+++ b/api/symbols/KJUR.crypto.html
@@ -487,8 +487,6 @@
Classes
KJUR.crypto
-
KJUR.crypto.Cipher
-
KJUR.crypto.DSA
KJUR.crypto.ECDSA
@@ -759,7 +757,6 @@
NOTE: Please ignore method summary and document of this namespace. This caused by a bug of jsdoc2.
diff --git a/api/symbols/KJUR.html b/api/symbols/KJUR.html
index 069d6d5a..c0f02d0d 100644
--- a/api/symbols/KJUR.html
+++ b/api/symbols/KJUR.html
@@ -487,8 +487,6 @@ Classes
KJUR.crypto
-
KJUR.crypto.Cipher
-
KJUR.crypto.DSA
KJUR.crypto.ECDSA
diff --git a/api/symbols/KJUR.jws.IntDate.html b/api/symbols/KJUR.jws.IntDate.html
index ec17a636..dce0a9e3 100644
--- a/api/symbols/KJUR.jws.IntDate.html
+++ b/api/symbols/KJUR.jws.IntDate.html
@@ -487,8 +487,6 @@
Classes
KJUR.crypto
-
KJUR.crypto.Cipher
-
KJUR.crypto.DSA
KJUR.crypto.ECDSA
diff --git a/api/symbols/KJUR.jws.JWS.html b/api/symbols/KJUR.jws.JWS.html
index 18fa857d..d8bb5e55 100644
--- a/api/symbols/KJUR.jws.JWS.html
+++ b/api/symbols/KJUR.jws.JWS.html
@@ -487,8 +487,6 @@
Classes
KJUR.crypto
-
KJUR.crypto.Cipher
-
KJUR.crypto.DSA
KJUR.crypto.ECDSA
diff --git a/api/symbols/KJUR.jws.JWSJS.html b/api/symbols/KJUR.jws.JWSJS.html
index 39bf097e..68d73e61 100644
--- a/api/symbols/KJUR.jws.JWSJS.html
+++ b/api/symbols/KJUR.jws.JWSJS.html
@@ -487,8 +487,6 @@
Classes
KJUR.crypto
-
KJUR.crypto.Cipher
-
KJUR.crypto.DSA
KJUR.crypto.ECDSA
diff --git a/api/symbols/KJUR.jws.html b/api/symbols/KJUR.jws.html
index f979b718..28cd777f 100644
--- a/api/symbols/KJUR.jws.html
+++ b/api/symbols/KJUR.jws.html
@@ -487,8 +487,6 @@
Classes
KJUR.crypto
-
KJUR.crypto.Cipher
-
KJUR.crypto.DSA
KJUR.crypto.ECDSA
diff --git a/api/symbols/KJUR.lang.String.html b/api/symbols/KJUR.lang.String.html
index 264535e3..29f61f4c 100644
--- a/api/symbols/KJUR.lang.String.html
+++ b/api/symbols/KJUR.lang.String.html
@@ -487,8 +487,6 @@
Classes
KJUR.crypto
-
KJUR.crypto.Cipher
-
KJUR.crypto.DSA
KJUR.crypto.ECDSA
diff --git a/api/symbols/RSAKey.html b/api/symbols/RSAKey.html
index 5b7ae0c0..0f35f7db 100644
--- a/api/symbols/RSAKey.html
+++ b/api/symbols/RSAKey.html
@@ -487,8 +487,6 @@
Classes
KJUR.crypto
-
KJUR.crypto.Cipher
-
KJUR.crypto.DSA
KJUR.crypto.ECDSA
diff --git a/api/symbols/X509.html b/api/symbols/X509.html
index d5a08ebb..57271682 100644
--- a/api/symbols/X509.html
+++ b/api/symbols/X509.html
@@ -487,8 +487,6 @@
Classes
KJUR.crypto
-
KJUR.crypto.Cipher
-
KJUR.crypto.DSA
KJUR.crypto.ECDSA
diff --git a/api/symbols/X509CRL.html b/api/symbols/X509CRL.html
index 02d7d00c..3221f4bd 100644
--- a/api/symbols/X509CRL.html
+++ b/api/symbols/X509CRL.html
@@ -487,8 +487,6 @@
Classes
KJUR.crypto
-
KJUR.crypto.Cipher
-
KJUR.crypto.DSA
KJUR.crypto.ECDSA
diff --git a/api/symbols/global__.html b/api/symbols/global__.html
index 0f6cda65..4e5311fd 100644
--- a/api/symbols/global__.html
+++ b/api/symbols/global__.html
@@ -487,8 +487,6 @@
Classes
KJUR.crypto
-
KJUR.crypto.Cipher
-
KJUR.crypto.DSA
KJUR.crypto.ECDSA
diff --git a/api/symbols/src/crypto-1.1.js.html b/api/symbols/src/crypto-1.1.js.html
index 33b1d672..d7316284 100644
--- a/api/symbols/src/crypto-1.1.js.html
+++ b/api/symbols/src/crypto-1.1.js.html
@@ -5,7 +5,7 @@
.STRN {color: #393;}
.REGX {color: #339;}
.line {border-right: 1px dotted #666; color: #666; font-style: normal;}
-
1 /* crypto-1.3.0.js (c) 2013-2021 Kenji Urushima | kjur.github.io/jsrsasign/license
+ 1 /* crypto-2.0.0.js (c) 2013-2024 Kenji Urushima | kjur.github.io/jsrsasign/license
2 */
3 /*
4 * crypto.js - Cryptographic Algorithm Provider class
@@ -23,7 +23,7 @@
16 * @fileOverview
17 * @name crypto-1.1.js
18 * @author Kenji Urushima kenji.urushima@gmail.com
- 19 * @version jsrsasign 10.9.0 crypto 1.3.0 (2023-Nov-27)
+ 19 * @version jsrsasign 11.0.0 crypto 2.0.0 (2024-Jan-16)
20 * @since jsrsasign 2.2
21 * @license <a href="https://kjur.github.io/jsrsasign/license/">MIT License</a>
22 */
@@ -41,1370 +41,1370 @@
34 * <ul>
35 * <li>{@link KJUR.crypto.MessageDigest} - Java JCE(cryptograhic extension) style MessageDigest class</li>
36 * <li>{@link KJUR.crypto.Signature} - Java JCE(cryptograhic extension) style Signature class</li>
- 37 * <li>{@link KJUR.crypto.Cipher} - class for encrypting and decrypting data</li>
- 38 * <li>{@link KJUR.crypto.Util} - cryptographic utility functions and properties</li>
- 39 * </ul>
- 40 * NOTE: Please ignore method summary and document of this namespace. This caused by a bug of jsdoc2.
- 41 * </p>
- 42 * @name KJUR.crypto
- 43 * @namespace
- 44 */
- 45 if (typeof KJUR.crypto == "undefined" || !KJUR.crypto) KJUR.crypto = {};
- 46
- 47 /**
- 48 * static object for cryptographic function utilities
- 49 * @name KJUR.crypto.Util
- 50 * @class static object for cryptographic function utilities
- 51 * @property {Array} DIGESTINFOHEAD PKCS#1 DigestInfo heading hexadecimal bytes for each hash algorithms
- 52 * @property {Array} DEFAULTPROVIDER associative array of default provider name for each hash and signature algorithms
- 53 * @description
- 54 */
- 55 KJUR.crypto.Util = new function() {
- 56 this.DIGESTINFOHEAD = {
- 57 'sha1': "3021300906052b0e03021a05000414",
- 58 'sha224': "302d300d06096086480165030402040500041c",
- 59 'sha256': "3031300d060960864801650304020105000420",
- 60 'sha384': "3041300d060960864801650304020205000430",
- 61 'sha512': "3051300d060960864801650304020305000440",
- 62 'md2': "3020300c06082a864886f70d020205000410",
- 63 'md5': "3020300c06082a864886f70d020505000410",
- 64 'ripemd160': "3021300906052b2403020105000414",
- 65 };
- 66
- 67 /*
- 68 * @since crypto 1.1.1
- 69 */
- 70 this.DEFAULTPROVIDER = {
- 71 'md5': 'cryptojs',
- 72 'sha1': 'cryptojs',
- 73 'sha224': 'cryptojs',
- 74 'sha256': 'cryptojs',
- 75 'sha384': 'cryptojs',
- 76 'sha512': 'cryptojs',
- 77 'ripemd160': 'cryptojs',
- 78 'hmacmd5': 'cryptojs',
- 79 'hmacsha1': 'cryptojs',
- 80 'hmacsha224': 'cryptojs',
- 81 'hmacsha256': 'cryptojs',
- 82 'hmacsha384': 'cryptojs',
- 83 'hmacsha512': 'cryptojs',
- 84 'hmacripemd160': 'cryptojs',
- 85
- 86 'MD5withRSA': 'cryptojs/jsrsa',
- 87 'SHA1withRSA': 'cryptojs/jsrsa',
- 88 'SHA224withRSA': 'cryptojs/jsrsa',
- 89 'SHA256withRSA': 'cryptojs/jsrsa',
- 90 'SHA384withRSA': 'cryptojs/jsrsa',
- 91 'SHA512withRSA': 'cryptojs/jsrsa',
- 92 'RIPEMD160withRSA': 'cryptojs/jsrsa',
- 93
- 94 'MD5withECDSA': 'cryptojs/jsrsa',
- 95 'SHA1withECDSA': 'cryptojs/jsrsa',
- 96 'SHA224withECDSA': 'cryptojs/jsrsa',
- 97 'SHA256withECDSA': 'cryptojs/jsrsa',
- 98 'SHA384withECDSA': 'cryptojs/jsrsa',
- 99 'SHA512withECDSA': 'cryptojs/jsrsa',
-100 'RIPEMD160withECDSA': 'cryptojs/jsrsa',
-101
-102 'SHA1withDSA': 'cryptojs/jsrsa',
-103 'SHA224withDSA': 'cryptojs/jsrsa',
-104 'SHA256withDSA': 'cryptojs/jsrsa',
-105
-106 'MD5withRSAandMGF1': 'cryptojs/jsrsa',
-107 'SHAwithRSAandMGF1': 'cryptojs/jsrsa',
-108 'SHA1withRSAandMGF1': 'cryptojs/jsrsa',
-109 'SHA224withRSAandMGF1': 'cryptojs/jsrsa',
-110 'SHA256withRSAandMGF1': 'cryptojs/jsrsa',
-111 'SHA384withRSAandMGF1': 'cryptojs/jsrsa',
-112 'SHA512withRSAandMGF1': 'cryptojs/jsrsa',
-113 'RIPEMD160withRSAandMGF1': 'cryptojs/jsrsa',
-114 };
-115
-116 /*
-117 * @since crypto 1.1.2
-118 */
-119 this.CRYPTOJSMESSAGEDIGESTNAME = {
-120 'md5': CryptoJS.algo.MD5,
-121 'sha1': CryptoJS.algo.SHA1,
-122 'sha224': CryptoJS.algo.SHA224,
-123 'sha256': CryptoJS.algo.SHA256,
-124 'sha384': CryptoJS.algo.SHA384,
-125 'sha512': CryptoJS.algo.SHA512,
-126 'ripemd160': CryptoJS.algo.RIPEMD160
-127 };
-128
-129 /**
-130 * get hexadecimal DigestInfo
-131 * @name getDigestInfoHex
-132 * @memberOf KJUR.crypto.Util
-133 * @function
-134 * @param {String} hHash hexadecimal hash value
-135 * @param {String} alg hash algorithm name (ex. 'sha1')
-136 * @return {String} hexadecimal string DigestInfo ASN.1 structure
-137 */
-138 this.getDigestInfoHex = function(hHash, alg) {
-139 if (typeof this.DIGESTINFOHEAD[alg] == "undefined")
-140 throw "alg not supported in Util.DIGESTINFOHEAD: " + alg;
-141 return this.DIGESTINFOHEAD[alg] + hHash;
-142 };
-143
-144 /**
-145 * get PKCS#1 padded hexadecimal DigestInfo
-146 * @name getPaddedDigestInfoHex
-147 * @memberOf KJUR.crypto.Util
-148 * @function
-149 * @param {String} hHash hexadecimal hash value of message to be signed
-150 * @param {String} alg hash algorithm name (ex. 'sha1')
-151 * @param {Integer} keySize key bit length (ex. 1024)
-152 * @return {String} hexadecimal string of PKCS#1 padded DigestInfo
-153 */
-154 this.getPaddedDigestInfoHex = function(hHash, alg, keySize) {
-155 var hDigestInfo = this.getDigestInfoHex(hHash, alg);
-156 var pmStrLen = keySize / 4; // minimum PM length
-157
-158 if (hDigestInfo.length + 22 > pmStrLen) // len(0001+ff(*8)+00+hDigestInfo)=22
-159 throw "key is too short for SigAlg: keylen=" + keySize + "," + alg;
-160
-161 var hHead = "0001";
-162 var hTail = "00" + hDigestInfo;
-163 var hMid = "";
-164 var fLen = pmStrLen - hHead.length - hTail.length;
-165 for (var i = 0; i < fLen; i += 2) {
-166 hMid += "ff";
-167 }
-168 var hPaddedMessage = hHead + hMid + hTail;
-169 return hPaddedMessage;
-170 };
-171
-172 /**
-173 * get hexadecimal hash of string with specified algorithm
-174 * @name hashString
-175 * @memberOf KJUR.crypto.Util
-176 * @function
-177 * @param {String} s raw input string to be hashed
-178 * @param {String} alg hash algorithm name
-179 * @return {String} hexadecimal string of hash value
-180 * @since 1.1.1
-181 */
-182 this.hashString = function(s, alg) {
-183 var md = new KJUR.crypto.MessageDigest({'alg': alg});
-184 return md.digestString(s);
-185 };
-186
-187 /**
-188 * get hexadecimal hash of hexadecimal string with specified algorithm
-189 * @name hashHex
-190 * @memberOf KJUR.crypto.Util
-191 * @function
-192 * @param {String} sHex input hexadecimal string to be hashed
-193 * @param {String} alg hash algorithm name
-194 * @return {String} hexadecimal string of hash value
-195 * @since 1.1.1
-196 */
-197 this.hashHex = function(sHex, alg) {
-198 var md = new KJUR.crypto.MessageDigest({'alg': alg});
-199 return md.digestHex(sHex);
-200 };
-201
-202 /**
-203 * get hexadecimal SHA1 hash of string
-204 * @name sha1
-205 * @memberOf KJUR.crypto.Util
-206 * @function
-207 * @param {String} s raw input string to be hashed
-208 * @return {String} hexadecimal string of hash value
-209 * @since 1.0.3
-210 */
-211 this.sha1 = function(s) {
-212 return this.hashString(s, 'sha1');
-213 };
-214
-215 /**
-216 * get hexadecimal SHA256 hash of string
-217 * @name sha256
-218 * @memberOf KJUR.crypto.Util
-219 * @function
-220 * @param {String} s raw input string to be hashed
-221 * @return {String} hexadecimal string of hash value
-222 * @since 1.0.3
-223 */
-224 this.sha256 = function(s) {
-225 return this.hashString(s, 'sha256');
-226 };
-227
-228 this.sha256Hex = function(s) {
-229 return this.hashHex(s, 'sha256');
-230 };
-231
-232 /**
-233 * get hexadecimal SHA512 hash of string
-234 * @name sha512
-235 * @memberOf KJUR.crypto.Util
-236 * @function
-237 * @param {String} s raw input string to be hashed
-238 * @return {String} hexadecimal string of hash value
-239 * @since 1.0.3
-240 */
-241 this.sha512 = function(s) {
-242 return this.hashString(s, 'sha512');
-243 };
-244
-245 this.sha512Hex = function(s) {
-246 return this.hashHex(s, 'sha512');
-247 };
-248
-249 /**
-250 * check if key object (RSA/DSA/ECDSA) or not
-251 * @name isKey
-252 * @memberOf KJUR.crypto.Util
-253 * @function
-254 * @param {Object} obj any type argument to be checked
-255 * @return {Boolean} true if this is key object otherwise false
-256 * @since 1.0.3
-257 */
-258 this.isKey = function(obj) {
-259 if (obj instanceof RSAKey ||
-260 obj instanceof KJUR.crypto.DSA ||
-261 obj instanceof KJUR.crypto.ECDSA) {
-262 return true;
-263 } else {
-264 return false;
-265 }
-266 };
-267 };
-268
-269 /**
-270 * get hexadecimal MD5 hash of string
-271 * @name md5
-272 * @memberOf KJUR.crypto.Util
-273 * @function
-274 * @param {String} s input string to be hashed
-275 * @return {String} hexadecimal string of hash value
-276 * @since 1.0.3
-277 * @example
-278 * Util.md5('aaa') → 47bce5c74f589f4867dbd57e9ca9f808
-279 */
-280 KJUR.crypto.Util.md5 = function(s) {
-281 var md = new KJUR.crypto.MessageDigest({'alg':'md5', 'prov':'cryptojs'});
-282 return md.digestString(s);
-283 };
-284
-285 /**
-286 * get hexadecimal RIPEMD160 hash of string
-287 * @name ripemd160
-288 * @memberOf KJUR.crypto.Util
-289 * @function
-290 * @param {String} s input string to be hashed
-291 * @return {String} hexadecimal string of hash value
-292 * @since 1.0.3
-293 * @example
-294 * KJUR.crypto.Util.ripemd160("aaa") → 08889bd7b151aa174c21f33f59147fa65381edea
-295 */
-296 KJUR.crypto.Util.ripemd160 = function(s) {
-297 var md = new KJUR.crypto.MessageDigest({'alg':'ripemd160', 'prov':'cryptojs'});
-298 return md.digestString(s);
-299 };
-300
-301 // @since jsrsasign 7.0.0 crypto 1.1.11
-302 KJUR.crypto.Util.SECURERANDOMGEN = new SecureRandom();
-303
-304 /**
-305 * get hexadecimal string of random value from with specified byte length<br/>
-306 * @name getRandomHexOfNbytes
-307 * @memberOf KJUR.crypto.Util
-308 * @function
-309 * @param {Integer} n length of bytes of random
-310 * @return {String} hexadecimal string of random
-311 * @since jsrsasign 7.0.0 crypto 1.1.11
-312 * @example
-313 * KJUR.crypto.Util.getRandomHexOfNbytes(3) → "6314af", "000000" or "001fb4"
-314 * KJUR.crypto.Util.getRandomHexOfNbytes(128) → "8fbc..." in 1024bits
-315 */
-316 KJUR.crypto.Util.getRandomHexOfNbytes = function(n) {
-317 var ba = new Array(n);
-318 KJUR.crypto.Util.SECURERANDOMGEN.nextBytes(ba);
-319 return BAtohex(ba);
-320 };
-321
-322 /**
-323 * get BigInteger object of random value from with specified byte length<br/>
-324 * @name getRandomBigIntegerOfNbytes
-325 * @memberOf KJUR.crypto.Util
-326 * @function
-327 * @param {Integer} n length of bytes of random
-328 * @return {BigInteger} BigInteger object of specified random value
-329 * @since jsrsasign 7.0.0 crypto 1.1.11
-330 * @example
-331 * KJUR.crypto.Util.getRandomBigIntegerOfNbytes(3) → 6314af of BigInteger
-332 * KJUR.crypto.Util.getRandomBigIntegerOfNbytes(128) → 8fbc... of BigInteger
-333 */
-334 KJUR.crypto.Util.getRandomBigIntegerOfNbytes = function(n) {
-335 return new BigInteger(KJUR.crypto.Util.getRandomHexOfNbytes(n), 16);
-336 };
-337
-338 /**
-339 * get hexadecimal string of random value from with specified bit length<br/>
-340 * @name getRandomHexOfNbits
-341 * @memberOf KJUR.crypto.Util
-342 * @function
-343 * @param {Integer} n length of bits of random
-344 * @return {String} hexadecimal string of random
-345 * @since jsrsasign 7.0.0 crypto 1.1.11
-346 * @example
-347 * KJUR.crypto.Util.getRandomHexOfNbits(24) → "6314af", "000000" or "001fb4"
-348 * KJUR.crypto.Util.getRandomHexOfNbits(1024) → "8fbc..." in 1024bits
-349 */
-350 KJUR.crypto.Util.getRandomHexOfNbits = function(n) {
-351 var n_remainder = n % 8;
-352 var n_quotient = (n - n_remainder) / 8;
-353 var ba = new Array(n_quotient + 1);
-354 KJUR.crypto.Util.SECURERANDOMGEN.nextBytes(ba);
-355 ba[0] = (((255 << n_remainder) & 255) ^ 255) & ba[0];
-356 return BAtohex(ba);
-357 };
-358
-359 /**
-360 * get BigInteger object of random value from with specified bit length<br/>
-361 * @name getRandomBigIntegerOfNbits
-362 * @memberOf KJUR.crypto.Util
-363 * @function
-364 * @param {Integer} n length of bits of random
-365 * @return {BigInteger} BigInteger object of specified random value
-366 * @since jsrsasign 7.0.0 crypto 1.1.11
-367 * @example
-368 * KJUR.crypto.Util.getRandomBigIntegerOfNbits(24) → 6314af of BigInteger
-369 * KJUR.crypto.Util.getRandomBigIntegerOfNbits(1024) → 8fbc... of BigInteger
-370 */
-371 KJUR.crypto.Util.getRandomBigIntegerOfNbits = function(n) {
-372 return new BigInteger(KJUR.crypto.Util.getRandomHexOfNbits(n), 16);
-373 };
-374
-375 /**
-376 * get BigInteger object of random value from zero to max value<br/>
-377 * @name getRandomBigIntegerZeroToMax
-378 * @memberOf KJUR.crypto.Util
-379 * @function
-380 * @param {BigInteger} biMax max value of BigInteger object for random value
-381 * @return {BigInteger} BigInteger object of specified random value
-382 * @since jsrsasign 7.0.0 crypto 1.1.11
-383 * @description
-384 * This static method generates a BigInteger object with random value
-385 * greater than or equal to zero and smaller than or equal to biMax
-386 * (i.e. 0 ≤ result ≤ biMax).
-387 * @example
-388 * biMax = new BigInteger("3fa411...", 16);
-389 * KJUR.crypto.Util.getRandomBigIntegerZeroToMax(biMax) → 8fbc... of BigInteger
-390 */
-391 KJUR.crypto.Util.getRandomBigIntegerZeroToMax = function(biMax) {
-392 var bitLenMax = biMax.bitLength();
-393 while (1) {
-394 var biRand = KJUR.crypto.Util.getRandomBigIntegerOfNbits(bitLenMax);
-395 if (biMax.compareTo(biRand) != -1) return biRand;
-396 }
-397 };
-398
-399 /**
-400 * get BigInteger object of random value from min value to max value<br/>
-401 * @name getRandomBigIntegerMinToMax
-402 * @memberOf KJUR.crypto.Util
-403 * @function
-404 * @param {BigInteger} biMin min value of BigInteger object for random value
-405 * @param {BigInteger} biMax max value of BigInteger object for random value
-406 * @return {BigInteger} BigInteger object of specified random value
-407 * @since jsrsasign 7.0.0 crypto 1.1.11
-408 * @description
-409 * This static method generates a BigInteger object with random value
-410 * greater than or equal to biMin and smaller than or equal to biMax
-411 * (i.e. biMin ≤ result ≤ biMax).
-412 * @example
-413 * biMin = new BigInteger("2fa411...", 16);
-414 * biMax = new BigInteger("3fa411...", 16);
-415 * KJUR.crypto.Util.getRandomBigIntegerMinToMax(biMin, biMax) → 32f1... of BigInteger
-416 */
-417 KJUR.crypto.Util.getRandomBigIntegerMinToMax = function(biMin, biMax) {
-418 var flagCompare = biMin.compareTo(biMax);
-419 if (flagCompare == 1) throw "biMin is greater than biMax";
-420 if (flagCompare == 0) return biMin;
-421
-422 var biDiff = biMax.subtract(biMin);
-423 var biRand = KJUR.crypto.Util.getRandomBigIntegerZeroToMax(biDiff);
-424 return biRand.add(biMin);
-425 };
-426
-427 // === Mac ===============================================================
-428
-429 /**
-430 * MessageDigest class which is very similar to java.security.MessageDigest class<br/>
-431 * @name KJUR.crypto.MessageDigest
-432 * @class MessageDigest class which is very similar to java.security.MessageDigest class
-433 * @param {Array} params parameters for constructor
-434 * @property {Array} HASHLENGTH static Array of resulted byte length of hash (ex. HASHLENGTH["sha1"] == 20)
-435 * @description
-436 * <br/>
-437 * Currently this supports following algorithm and providers combination:
-438 * <ul>
-439 * <li>md5 - cryptojs</li>
-440 * <li>sha1 - cryptojs</li>
-441 * <li>sha224 - cryptojs</li>
-442 * <li>sha256 - cryptojs</li>
-443 * <li>sha384 - cryptojs</li>
-444 * <li>sha512 - cryptojs</li>
-445 * <li>ripemd160 - cryptojs</li>
-446 * <li>sha256 - sjcl (NEW from crypto.js 1.0.4)</li>
-447 * </ul>
-448 * @example
-449 * // CryptoJS provider sample
-450 * var md = new KJUR.crypto.MessageDigest({alg: "sha1", prov: "cryptojs"});
-451 * md.updateString('aaa')
-452 * var mdHex = md.digest()
-453 *
-454 * // SJCL(Stanford JavaScript Crypto Library) provider sample
-455 * var md = new KJUR.crypto.MessageDigest({alg: "sha256", prov: "sjcl"}); // sjcl supports sha256 only
-456 * md.updateString('aaa')
-457 * var mdHex = md.digest()
-458 *
-459 * // HASHLENGTH property
-460 * KJUR.crypto.MessageDigest.HASHLENGTH['sha1'] &rarr 20
-461 * KJUR.crypto.MessageDigest.HASHLENGTH['sha512'] &rarr 64
-462 */
-463 KJUR.crypto.MessageDigest = function(params) {
-464 var md = null;
-465 var algName = null;
-466 var provName = null;
-467
-468 /**
-469 * set hash algorithm and provider<br/>
-470 * @name setAlgAndProvider
-471 * @memberOf KJUR.crypto.MessageDigest#
-472 * @function
-473 * @param {String} alg hash algorithm name
-474 * @param {String} prov provider name
-475 * @description
-476 * This methods set an algorithm and a cryptographic provider.<br/>
-477 * Here is acceptable algorithm names ignoring cases and hyphens:
-478 * <ul>
-479 * <li>MD5</li>
-480 * <li>SHA1</li>
-481 * <li>SHA224</li>
-482 * <li>SHA256</li>
-483 * <li>SHA384</li>
-484 * <li>SHA512</li>
-485 * <li>RIPEMD160</li>
-486 * </ul>
-487 * NOTE: Since jsrsasign 6.2.0 crypto 1.1.10, this method ignores
-488 * upper or lower cases. Also any hyphens (i.e. "-") will be ignored
-489 * so that "SHA1" or "SHA-1" will be acceptable.
-490 * @example
-491 * // for SHA1
-492 * md.setAlgAndProvider('sha1', 'cryptojs');
-493 * md.setAlgAndProvider('SHA1');
-494 * // for RIPEMD160
-495 * md.setAlgAndProvider('ripemd160', 'cryptojs');
-496 */
-497 this.setAlgAndProvider = function(alg, prov) {
-498 alg = KJUR.crypto.MessageDigest.getCanonicalAlgName(alg);
-499
-500 if (alg !== null && prov === undefined) prov = KJUR.crypto.Util.DEFAULTPROVIDER[alg];
-501
-502 // for cryptojs
-503 if (':md5:sha1:sha224:sha256:sha384:sha512:ripemd160:'.indexOf(alg) != -1 &&
-504 prov == 'cryptojs') {
-505 try {
-506 this.md = KJUR.crypto.Util.CRYPTOJSMESSAGEDIGESTNAME[alg].create();
-507 } catch (ex) {
-508 throw "setAlgAndProvider hash alg set fail alg=" + alg + "/" + ex;
-509 }
-510 this.updateString = function(str) {
-511 this.md.update(str);
-512 };
-513 this.updateHex = function(hex) {
-514 var wHex = CryptoJS.enc.Hex.parse(hex);
-515 this.md.update(wHex);
-516 };
-517 this.digest = function() {
-518 var hash = this.md.finalize();
-519 return hash.toString(CryptoJS.enc.Hex);
-520 };
-521 this.digestString = function(str) {
-522 this.updateString(str);
-523 return this.digest();
-524 };
-525 this.digestHex = function(hex) {
-526 this.updateHex(hex);
-527 return this.digest();
-528 };
-529 }
-530 if (':sha256:'.indexOf(alg) != -1 &&
-531 prov == 'sjcl') {
-532 try {
-533 this.md = new sjcl.hash.sha256();
-534 } catch (ex) {
-535 throw "setAlgAndProvider hash alg set fail alg=" + alg + "/" + ex;
-536 }
-537 this.updateString = function(str) {
-538 this.md.update(str);
-539 };
-540 this.updateHex = function(hex) {
-541 var baHex = sjcl.codec.hex.toBits(hex);
-542 this.md.update(baHex);
-543 };
-544 this.digest = function() {
-545 var hash = this.md.finalize();
-546 return sjcl.codec.hex.fromBits(hash);
-547 };
-548 this.digestString = function(str) {
-549 this.updateString(str);
-550 return this.digest();
-551 };
-552 this.digestHex = function(hex) {
-553 this.updateHex(hex);
-554 return this.digest();
-555 };
-556 }
-557 };
-558
-559 /**
-560 * update digest by specified string
-561 * @name updateString
-562 * @memberOf KJUR.crypto.MessageDigest#
-563 * @function
-564 * @param {String} str string to update
-565 * @description
-566 * @example
-567 * md.updateString('New York');
-568 */
-569 this.updateString = function(str) {
-570 throw "updateString(str) not supported for this alg/prov: " + this.algName + "/" + this.provName;
-571 };
-572
-573 /**
-574 * update digest by specified hexadecimal string
-575 * @name updateHex
-576 * @memberOf KJUR.crypto.MessageDigest#
-577 * @function
-578 * @param {String} hex hexadecimal string to update
-579 * @description
-580 * @example
-581 * md.updateHex('0afe36');
-582 */
-583 this.updateHex = function(hex) {
-584 throw "updateHex(hex) not supported for this alg/prov: " + this.algName + "/" + this.provName;
-585 };
-586
-587 /**
-588 * completes hash calculation and returns hash result
-589 * @name digest
-590 * @memberOf KJUR.crypto.MessageDigest#
-591 * @function
-592 * @description
-593 * @example
-594 * md.digest()
-595 */
-596 this.digest = function() {
-597 throw "digest() not supported for this alg/prov: " + this.algName + "/" + this.provName;
-598 };
-599
-600 /**
-601 * performs final update on the digest using string, then completes the digest computation
-602 * @name digestString
-603 * @memberOf KJUR.crypto.MessageDigest#
-604 * @function
-605 * @param {String} str string to final update
-606 * @description
-607 * @example
-608 * md.digestString('aaa')
-609 */
-610 this.digestString = function(str) {
-611 throw "digestString(str) not supported for this alg/prov: " + this.algName + "/" + this.provName;
-612 };
-613
-614 /**
-615 * performs final update on the digest using hexadecimal string, then completes the digest computation
-616 * @name digestHex
-617 * @memberOf KJUR.crypto.MessageDigest#
-618 * @function
-619 * @param {String} hex hexadecimal string to final update
-620 * @description
-621 * @example
-622 * md.digestHex('0f2abd')
-623 */
-624 this.digestHex = function(hex) {
-625 throw "digestHex(hex) not supported for this alg/prov: " + this.algName + "/" + this.provName;
-626 };
-627
-628 if (params !== undefined) {
-629 if (params['alg'] !== undefined) {
-630 this.algName = params['alg'];
-631 if (params['prov'] === undefined)
-632 this.provName = KJUR.crypto.Util.DEFAULTPROVIDER[this.algName];
-633 this.setAlgAndProvider(this.algName, this.provName);
-634 }
-635 }
-636 };
-637
-638 /**
-639 * get canonical hash algorithm name<br/>
-640 * @name getCanonicalAlgName
-641 * @memberOf KJUR.crypto.MessageDigest
-642 * @function
-643 * @param {String} alg hash algorithm name (ex. MD5, SHA-1, SHA1, SHA512 et.al.)
-644 * @return {String} canonical hash algorithm name
-645 * @since jsrsasign 6.2.0 crypto 1.1.10
-646 * @description
-647 * This static method normalizes from any hash algorithm name such as
-648 * "SHA-1", "SHA1", "MD5", "sha512" to lower case name without hyphens
-649 * such as "sha1".
-650 * @example
-651 * KJUR.crypto.MessageDigest.getCanonicalAlgName("SHA-1") &rarr "sha1"
-652 * KJUR.crypto.MessageDigest.getCanonicalAlgName("MD5") &rarr "md5"
-653 */
-654 KJUR.crypto.MessageDigest.getCanonicalAlgName = function(alg) {
-655 if (typeof alg === "string") {
-656 alg = alg.toLowerCase();
-657 alg = alg.replace(/-/, '');
-658 }
-659 return alg;
-660 };
-661
-662 /**
-663 * get resulted hash byte length for specified algorithm name<br/>
-664 * @name getHashLength
-665 * @memberOf KJUR.crypto.MessageDigest
-666 * @function
-667 * @param {String} alg non-canonicalized hash algorithm name (ex. MD5, SHA-1, SHA1, SHA512 et.al.)
-668 * @return {Integer} resulted hash byte length
-669 * @since jsrsasign 6.2.0 crypto 1.1.10
-670 * @description
-671 * This static method returns resulted byte length for specified algorithm name such as "SHA-1".
-672 * @example
-673 * KJUR.crypto.MessageDigest.getHashLength("SHA-1") &rarr 20
-674 * KJUR.crypto.MessageDigest.getHashLength("sha1") &rarr 20
-675 */
-676 KJUR.crypto.MessageDigest.getHashLength = function(alg) {
-677 var MD = KJUR.crypto.MessageDigest
-678 var alg2 = MD.getCanonicalAlgName(alg);
-679 if (MD.HASHLENGTH[alg2] === undefined)
-680 throw "not supported algorithm: " + alg;
-681 return MD.HASHLENGTH[alg2];
-682 };
-683
-684 // described in KJUR.crypto.MessageDigest class (since jsrsasign 6.2.0 crypto 1.1.10)
-685 KJUR.crypto.MessageDigest.HASHLENGTH = {
-686 'md5': 16,
-687 'sha1': 20,
-688 'sha224': 28,
-689 'sha256': 32,
-690 'sha384': 48,
-691 'sha512': 64,
-692 'ripemd160': 20
-693 };
-694
-695 // === Mac ===============================================================
-696
-697 /**
-698 * Mac(Message Authentication Code) class which is very similar to java.security.Mac class
-699 * @name KJUR.crypto.Mac
-700 * @class Mac class which is very similar to java.security.Mac class
-701 * @param {Array} params parameters for constructor
-702 * @description
-703 * <br/>
-704 * Currently this supports following algorithm and providers combination:
-705 * <ul>
-706 * <li>hmacmd5 - cryptojs</li>
-707 * <li>hmacsha1 - cryptojs</li>
-708 * <li>hmacsha224 - cryptojs</li>
-709 * <li>hmacsha256 - cryptojs</li>
-710 * <li>hmacsha384 - cryptojs</li>
-711 * <li>hmacsha512 - cryptojs</li>
-712 * </ul>
-713 * NOTE: HmacSHA224 and HmacSHA384 issue was fixed since jsrsasign 4.1.4.
-714 * Please use 'ext/cryptojs-312-core-fix*.js' instead of 'core.js' of original CryptoJS
-715 * to avoid those issue.
-716 * <br/>
-717 * NOTE2: Hmac signature bug was fixed in jsrsasign 4.9.0 by providing CryptoJS
-718 * bug workaround.
-719 * <br/>
-720 * Please see {@link KJUR.crypto.Mac.setPassword}, how to provide password
-721 * in various ways in detail.
-722 * @example
-723 * var mac = new KJUR.crypto.Mac({alg: "HmacSHA256", "pass": "pass"});
-724 * mac.updateString('aaa')
-725 * mac.doFinal() → "5737da..."
-726 *
-727 * // other password representation
-728 * var mac = new KJUR.crypto.Mac({alg: "HmacSHA256", "pass": {"hex": "6161"}});
-729 * var mac = new KJUR.crypto.Mac({alg: "HmacSHA256", "pass": {"utf8": "aa"}});
-730 * var mac = new KJUR.crypto.Mac({alg: "HmacSHA256", "pass": {"rstr": "\x61\x61"}});
-731 * var mac = new KJUR.crypto.Mac({alg: "HmacSHA256", "pass": {"b64": "Mi02/+...a=="}});
-732 * var mac = new KJUR.crypto.Mac({alg: "HmacSHA256", "pass": {"b64u": "Mi02_-...a"}});
-733 */
-734 KJUR.crypto.Mac = function(params) {
-735 var mac = null;
-736 var pass = null;
-737 var algName = null;
-738 var provName = null;
-739 var algProv = null;
-740
-741 this.setAlgAndProvider = function(alg, prov) {
-742 alg = alg.toLowerCase();
-743
-744 if (alg == null) alg = "hmacsha1";
-745
-746 alg = alg.toLowerCase();
-747 if (alg.substr(0, 4) != "hmac") {
-748 throw "setAlgAndProvider unsupported HMAC alg: " + alg;
-749 }
-750
-751 if (prov === undefined) prov = KJUR.crypto.Util.DEFAULTPROVIDER[alg];
-752 this.algProv = alg + "/" + prov;
-753
-754 var hashAlg = alg.substr(4);
-755
-756 // for cryptojs
-757 if (':md5:sha1:sha224:sha256:sha384:sha512:ripemd160:'.indexOf(hashAlg) != -1 &&
-758 prov == 'cryptojs') {
-759 try {
-760 var mdObj = KJUR.crypto.Util.CRYPTOJSMESSAGEDIGESTNAME[hashAlg];
-761 this.mac = CryptoJS.algo.HMAC.create(mdObj, this.pass);
-762 } catch (ex) {
-763 throw "setAlgAndProvider hash alg set fail hashAlg=" + hashAlg + "/" + ex;
-764 }
-765 this.updateString = function(str) {
-766 this.mac.update(str);
-767 };
-768 this.updateHex = function(hex) {
-769 var wHex = CryptoJS.enc.Hex.parse(hex);
-770 this.mac.update(wHex);
-771 };
-772 this.doFinal = function() {
-773 var hash = this.mac.finalize();
-774 return hash.toString(CryptoJS.enc.Hex);
-775 };
-776 this.doFinalString = function(str) {
-777 this.updateString(str);
-778 return this.doFinal();
-779 };
-780 this.doFinalHex = function(hex) {
-781 this.updateHex(hex);
-782 return this.doFinal();
-783 };
-784 }
-785 };
-786
-787 /**
-788 * update digest by specified string<br/>
-789 * @name updateString
-790 * @memberOf KJUR.crypto.Mac#
-791 * @function
-792 * @param {String} str string to update
-793 *
-794 * @description
-795 * @example
-796 * var mac = new KJUR.crypto.Mac({alg: "HmacSHA256", "pass": "pass"});
-797 * mac.updateString('aaa')
-798 * mac.doFinal() → "5737da..."
-799 */
-800 this.updateString = function(str) {
-801 throw "updateString(str) not supported for this alg/prov: " + this.algProv;
-802 };
-803
-804 /**
-805 * update digest by specified hexadecimal string<br/>
-806 * @name updateHex
-807 * @memberOf KJUR.crypto.Mac#
-808 * @function
-809 * @param {String} hex hexadecimal string to update
-810 *
-811 * @description
-812 * @example
-813 * var mac = new KJUR.crypto.Mac({alg: "HmacSHA256", "pass": "pass"});
-814 * mac.updateHex('616161')
-815 * mac.doFinal() → "5737da..."
-816 */
-817 this.updateHex = function(hex) {
-818 throw "updateHex(hex) not supported for this alg/prov: " + this.algProv;
-819 };
-820
-821 /**
-822 * completes hash calculation and returns hash result<br/>
-823 * @name doFinal
-824 * @memberOf KJUR.crypto.Mac#
-825 * @function
-826 * @returns hexadecimal string of Mac result value
-827 *
-828 * @description
-829 * @example
-830 * var mac = new KJUR.crypto.Mac({alg: "HmacSHA256", "pass": "pass"});
-831 * mac.updateString('aaa')
-832 * mac.doFinal() → "5737da..."
-833 */
-834 this.doFinal = function() {
-835 throw "digest() not supported for this alg/prov: " + this.algProv;
-836 };
-837
-838 /**
-839 * performs final update on the digest using string, then completes the digest computation<br/>
-840 * @name doFinalString
-841 * @memberOf KJUR.crypto.Mac#
-842 * @function
-843 * @param {String} str raw string to final update
-844 * @returns hexadecimal string of Mac result value
-845 *
-846 * @description
-847 * @example
-848 * var mac = new KJUR.crypto.Mac({alg: "HmacSHA256", "pass": "pass"});
-849 * mac.doFinalString("aaa") → "5737da..."
-850 */
-851 this.doFinalString = function(str) {
-852 throw "digestString(str) not supported for this alg/prov: " + this.algProv;
-853 };
-854
-855 /**
-856 * performs final update on the digest using hexadecimal string, then completes the digest computation<br/>
-857 * @name doFinalHex
-858 * @memberOf KJUR.crypto.Mac#
-859 * @function
-860 * @param {String} hex hexadecimal string to final update
-861 * @returns hexadecimal string of Mac result value
-862 *
-863 * @description
-864 * @example
-865 * var mac = new KJUR.crypto.Mac({alg: "HmacSHA256", "pass": "pass"});
-866 * mac.doFinalHex("616161") → "5737da..."
-867 */
-868 this.doFinalHex = function(hex) {
-869 throw "digestHex(hex) not supported for this alg/prov: " + this.algProv;
-870 };
-871
-872 /**
-873 * set password for Mac<br/>
-874 * @name setPassword
-875 * @memberOf KJUR.crypto.Mac#
-876 * @function
-877 * @param {Object} pass password for Mac
-878 * @since crypto 1.1.7 jsrsasign 4.9.0
-879 * @description
-880 * This method will set password for (H)Mac internally.
-881 * Argument 'pass' can be specified as following:
-882 * <ul>
-883 * <li>even length string of 0..9, a..f or A-F: implicitly specified as hexadecimal string</li>
-884 * <li>not above string: implicitly specified as raw string</li>
-885 * <li>{rstr: "\x65\x70"}: explicitly specified as raw string</li>
-886 * <li>{hex: "6570"}: explicitly specified as hexacedimal string</li>
-887 * <li>{utf8: "秘密"}: explicitly specified as UTF8 string</li>
-888 * <li>{b64: "Mi78..=="}: explicitly specified as Base64 string</li>
-889 * <li>{b64u: "Mi7-_"}: explicitly specified as Base64URL string</li>
-890 * </ul>
-891 * It is *STRONGLY RECOMMENDED* that explicit representation of password argument
-892 * to avoid ambiguity. For example string "6161" can mean a string "6161" or
-893 * a hexadecimal string of "aa" (i.e. \x61\x61).
-894 * @example
-895 * mac = KJUR.crypto.Mac({'alg': 'hmacsha256'});
-896 * // set password by implicit raw string
-897 * mac.setPassword("\x65\x70\xb9\x0b");
-898 * mac.setPassword("password");
-899 * // set password by implicit hexadecimal string
-900 * mac.setPassword("6570b90b");
-901 * mac.setPassword("6570B90B");
-902 * // set password by explicit raw string
-903 * mac.setPassword({"rstr": "\x65\x70\xb9\x0b"});
-904 * // set password by explicit hexadecimal string
-905 * mac.setPassword({"hex": "6570b90b"});
-906 * // set password by explicit utf8 string
-907 * mac.setPassword({"utf8": "passwordパスワード");
-908 * // set password by explicit Base64 string
-909 * mac.setPassword({"b64": "Mb+c3f/=="});
-910 * // set password by explicit Base64URL string
-911 * mac.setPassword({"b64u": "Mb-c3f_"});
-912 */
-913 this.setPassword = function(pass) {
-914 // internal this.pass shall be CryptoJS DWord Object for CryptoJS bug
-915 // work around. CrytoJS HMac password can be passed by
-916 // raw string as described in the manual however it doesn't
-917 // work properly in some case. If password was passed
-918 // by CryptoJS DWord which is not described in the manual
-919 // it seems to work. (fixed since crypto 1.1.7)
-920
-921 if (typeof pass == 'string') {
-922 var hPass = pass;
-923 if (pass.length % 2 == 1 || ! pass.match(/^[0-9A-Fa-f]+$/)) { // raw str
-924 hPass = rstrtohex(pass);
-925 }
-926 this.pass = CryptoJS.enc.Hex.parse(hPass);
-927 return;
-928 }
-929
-930 if (typeof pass != 'object')
-931 throw "KJUR.crypto.Mac unsupported password type: " + pass;
-932
-933 var hPass = null;
-934 if (pass.hex !== undefined) {
-935 if (pass.hex.length % 2 != 0 || ! pass.hex.match(/^[0-9A-Fa-f]+$/))
-936 throw "Mac: wrong hex password: " + pass.hex;
-937 hPass = pass.hex;
-938 }
-939 if (pass.utf8 !== undefined) hPass = utf8tohex(pass.utf8);
-940 if (pass.rstr !== undefined) hPass = rstrtohex(pass.rstr);
-941 if (pass.b64 !== undefined) hPass = b64tohex(pass.b64);
-942 if (pass.b64u !== undefined) hPass = b64utohex(pass.b64u);
-943
-944 if (hPass == null)
-945 throw "KJUR.crypto.Mac unsupported password type: " + pass;
-946
-947 this.pass = CryptoJS.enc.Hex.parse(hPass);
-948 };
-949
-950 if (params !== undefined) {
-951 if (params.pass !== undefined) {
-952 this.setPassword(params.pass);
-953 }
-954 if (params.alg !== undefined) {
-955 this.algName = params.alg;
-956 if (params['prov'] === undefined)
-957 this.provName = KJUR.crypto.Util.DEFAULTPROVIDER[this.algName];
-958 this.setAlgAndProvider(this.algName, this.provName);
-959 }
-960 }
-961 };
-962
-963 // ====== Signature class ====================================================
-964 /**
-965 * Signature class which is very similar to java.security.Signature class
-966 * @name KJUR.crypto.Signature
-967 * @class Signature class which is very similar to java.security.Signature class
-968 * @param {Array} params parameters for constructor
-969 * @property {String} state Current state of this signature object whether 'SIGN', 'VERIFY' or null
-970 * @description
-971 * <br/>
-972 * As for params of constructor's argument, it can be specify following attributes:
-973 * <ul>
-974 * <li>alg - signature algorithm name (ex. {MD5,SHA1,SHA224,SHA256,SHA384,SHA512,RIPEMD160}with{RSA,ECDSA,DSA})</li>
-975 * <li>provider - currently 'cryptojs/jsrsa' only</li>
-976 * </ul>
-977 * <h4>SUPPORTED ALGORITHMS AND PROVIDERS</h4>
-978 * This Signature class supports following signature algorithm and provider names:
-979 * <ul>
-980 * <li>MD5withRSA - cryptojs/jsrsa</li>
-981 * <li>SHA1withRSA - cryptojs/jsrsa</li>
-982 * <li>SHA224withRSA - cryptojs/jsrsa</li>
-983 * <li>SHA256withRSA - cryptojs/jsrsa</li>
-984 * <li>SHA384withRSA - cryptojs/jsrsa</li>
-985 * <li>SHA512withRSA - cryptojs/jsrsa</li>
-986 * <li>RIPEMD160withRSA - cryptojs/jsrsa</li>
-987 * <li>MD5withECDSA - cryptojs/jsrsa</li>
-988 * <li>SHA1withECDSA - cryptojs/jsrsa</li>
-989 * <li>SHA224withECDSA - cryptojs/jsrsa</li>
-990 * <li>SHA256withECDSA - cryptojs/jsrsa</li>
-991 * <li>SHA384withECDSA - cryptojs/jsrsa</li>
-992 * <li>SHA512withECDSA - cryptojs/jsrsa</li>
-993 * <li>RIPEMD160withECDSA - cryptojs/jsrsa</li>
-994 * <li>MD5withRSAandMGF1 - cryptojs/jsrsa</li>
-995 * <li>SHAwithRSAandMGF1 - cryptojs/jsrsa</li>
-996 * <li>SHA1withRSAandMGF1 - cryptojs/jsrsa</li>
-997 * <li>SHA224withRSAandMGF1 - cryptojs/jsrsa</li>
-998 * <li>SHA256withRSAandMGF1 - cryptojs/jsrsa</li>
-999 * <li>SHA384withRSAandMGF1 - cryptojs/jsrsa</li>
-1000 * <li>SHA512withRSAandMGF1 - cryptojs/jsrsa</li>
-1001 * <li>RIPEMD160withRSAandMGF1 - cryptojs/jsrsa</li>
-1002 * <li>SHA1withDSA - cryptojs/jsrsa</li>
-1003 * <li>SHA224withDSA - cryptojs/jsrsa</li>
-1004 * <li>SHA256withDSA - cryptojs/jsrsa</li>
-1005 * </ul>
-1006 * As for RSA-PSS signature algorithm names and signing parameters
-1007 * such as MGF function and salt length, please see
-1008 * {@link KJUR.asn1.x509.AlgorithmIdentifier} class.
-1009 *
-1010 * Here are supported elliptic cryptographic curve names and their aliases for ECDSA:
-1011 * <ul>
-1012 * <li>secp256k1</li>
-1013 * <li>secp256r1, NIST P-256, P-256, prime256v1</li>
-1014 * <li>secp384r1, NIST P-384, P-384</li>
-1015 * <li>secp521r1, NIST P-521, P-521</li>
-1016 * </ul>
-1017 * NOTE1: DSA signing algorithm is also supported since crypto 1.1.5.
-1018 * <h4>EXAMPLES</h4>
-1019 * @example
-1020 * // RSA signature generation
-1021 * var sig = new KJUR.crypto.Signature({"alg": "SHA1withRSA"});
-1022 * sig.init(prvKeyPEM);
-1023 * sig.updateString('aaa');
-1024 * var hSigVal = sig.sign();
-1025 *
-1026 * // DSA signature validation
-1027 * var sig2 = new KJUR.crypto.Signature({"alg": "SHA1withDSA"});
-1028 * sig2.init(certPEM);
-1029 * sig.updateString('aaa');
-1030 * var isValid = sig2.verify(hSigVal);
-1031 *
-1032 * // ECDSA signing
-1033 * var sig = new KJUR.crypto.Signature({'alg':'SHA1withECDSA'});
-1034 * sig.init(prvKeyPEM);
-1035 * sig.updateString('aaa');
-1036 * var sigValueHex = sig.sign();
-1037 *
-1038 * // ECDSA verifying
-1039 * var sig2 = new KJUR.crypto.Signature({'alg':'SHA1withECDSA'});
-1040 * sig.init(certPEM);
-1041 * sig.updateString('aaa');
-1042 * var isValid = sig.verify(sigValueHex);
-1043 */
-1044 KJUR.crypto.Signature = function(params) {
-1045 var prvKey = null; // RSAKey/KJUR.crypto.{ECDSA,DSA} object for signing
-1046 var pubKey = null; // RSAKey/KJUR.crypto.{ECDSA,DSA} object for verifying
-1047
-1048 var md = null; // KJUR.crypto.MessageDigest object
-1049 var sig = null;
-1050 var algName = null;
-1051 var provName = null;
-1052 var algProvName = null;
-1053 var mdAlgName = null;
-1054 var pubkeyAlgName = null; // rsa,ecdsa,rsaandmgf1(=rsapss)
-1055 var state = null;
-1056 var pssSaltLen = -1;
-1057 var initParams = null;
-1058
-1059 var sHashHex = null; // hex hash value for hex
-1060 var hDigestInfo = null;
-1061 var hPaddedDigestInfo = null;
-1062 var hSign = null;
-1063
-1064 this._setAlgNames = function() {
-1065 var matchResult = this.algName.match(/^(.+)with(.+)$/);
-1066 if (matchResult) {
-1067 this.mdAlgName = matchResult[1].toLowerCase();
-1068 this.pubkeyAlgName = matchResult[2].toLowerCase();
-1069 if (this.pubkeyAlgName == "rsaandmgf1" &&
-1070 this.mdAlgName == "sha") {
-1071 this.mdAlgName = "sha1";
-1072 }
-1073 }
-1074 };
-1075
-1076 this._zeroPaddingOfSignature = function(hex, bitLength) {
-1077 var s = "";
-1078 var nZero = bitLength / 4 - hex.length;
-1079 for (var i = 0; i < nZero; i++) {
-1080 s = s + "0";
-1081 }
-1082 return s + hex;
-1083 };
-1084
-1085 /**
-1086 * set signature algorithm and provider
-1087 * @name setAlgAndProvider
-1088 * @memberOf KJUR.crypto.Signature#
-1089 * @function
-1090 * @param {String} alg signature algorithm name
-1091 * @param {String} prov provider name
-1092 * @description
-1093 * @example
-1094 * md.setAlgAndProvider('SHA1withRSA', 'cryptojs/jsrsa');
-1095 */
-1096 this.setAlgAndProvider = function(alg, prov) {
-1097 this._setAlgNames();
-1098 if (prov != 'cryptojs/jsrsa')
-1099 throw new Error("provider not supported: " + prov);
-1100
-1101 if (':md5:sha1:sha224:sha256:sha384:sha512:ripemd160:'.indexOf(this.mdAlgName) != -1) {
-1102 try {
-1103 this.md = new KJUR.crypto.MessageDigest({'alg':this.mdAlgName});
-1104 } catch (ex) {
-1105 throw new Error("setAlgAndProvider hash alg set fail alg=" +
-1106 this.mdAlgName + "/" + ex);
-1107 }
-1108
-1109 this.init = function(keyparam, pass) {
-1110 var keyObj = null;
-1111 try {
-1112 if (pass === undefined) {
-1113 keyObj = KEYUTIL.getKey(keyparam);
-1114 } else {
-1115 keyObj = KEYUTIL.getKey(keyparam, pass);
-1116 }
-1117 } catch (ex) {
-1118 throw "init failed:" + ex;
-1119 }
-1120
-1121 if (keyObj.isPrivate === true) {
-1122 this.prvKey = keyObj;
-1123 this.state = "SIGN";
-1124 } else if (keyObj.isPublic === true) {
-1125 this.pubKey = keyObj;
-1126 this.state = "VERIFY";
-1127 } else {
-1128 throw "init failed.:" + keyObj;
-1129 }
-1130 };
-1131
-1132 this.updateString = function(str) {
-1133 this.md.updateString(str);
-1134 };
-1135
-1136 this.updateHex = function(hex) {
-1137 this.md.updateHex(hex);
-1138 };
-1139
-1140 this.sign = function() {
-1141 this.sHashHex = this.md.digest();
-1142 // hex parameter EC public key
-1143 if (this.prvKey === undefined &&
-1144 this.ecprvhex !== undefined &&
-1145 this.eccurvename !== undefined &&
-1146 KJUR.crypto.ECDSA !== undefined) {
-1147 this.prvKey = new KJUR.crypto.ECDSA({'curve': this.eccurvename,
-1148 prv: this.ecprvhex});
-1149 }
-1150
-1151 // RSAPSS
-1152 if (this.prvKey instanceof RSAKey &&
-1153 this.pubkeyAlgName === "rsaandmgf1") {
-1154 this.hSign = this.prvKey.signWithMessageHashPSS(this.sHashHex,
-1155 this.mdAlgName,
-1156 this.pssSaltLen);
-1157 // RSA
-1158 } else if (this.prvKey instanceof RSAKey &&
-1159 this.pubkeyAlgName === "rsa") {
-1160 this.hSign = this.prvKey.signWithMessageHash(this.sHashHex,
-1161 this.mdAlgName);
-1162 // ECDSA
-1163 } else if (this.prvKey instanceof KJUR.crypto.ECDSA) {
-1164 this.hSign = this.prvKey.signWithMessageHash(this.sHashHex);
-1165 // DSA
-1166 } else if (this.prvKey instanceof KJUR.crypto.DSA) {
-1167 this.hSign = this.prvKey.signWithMessageHash(this.sHashHex);
-1168 } else {
-1169 throw "Signature: unsupported private key alg: " + this.pubkeyAlgName;
-1170 }
-1171 return this.hSign;
-1172 };
-1173 this.signString = function(str) {
-1174 this.updateString(str);
-1175 return this.sign();
-1176 };
-1177 this.signHex = function(hex) {
-1178 this.updateHex(hex);
-1179 return this.sign();
-1180 };
-1181 this.verify = function(hSigVal) {
-1182 this.sHashHex = this.md.digest();
-1183 // hex parameter EC public key
-1184 if (this.pubKey === undefined &&
-1185 this.ecpubhex !== undefined &&
-1186 this.eccurvename !== undefined &&
-1187 KJUR.crypto.ECDSA !== undefined) {
-1188 this.pubKey = new KJUR.crypto.ECDSA({curve: this.eccurvename,
-1189 pub: this.ecpubhex});
-1190 }
-1191
-1192 // RSAPSS
-1193 if (this.pubKey instanceof RSAKey &&
-1194 this.pubkeyAlgName === "rsaandmgf1") {
-1195 return this.pubKey.verifyWithMessageHashPSS(this.sHashHex, hSigVal,
-1196 this.mdAlgName,
-1197 this.pssSaltLen);
-1198 // RSA
-1199 } else if (this.pubKey instanceof RSAKey &&
-1200 this.pubkeyAlgName === "rsa") {
-1201 return this.pubKey.verifyWithMessageHash(this.sHashHex, hSigVal);
-1202 // ECDSA
-1203 } else if (KJUR.crypto.ECDSA !== undefined &&
-1204 this.pubKey instanceof KJUR.crypto.ECDSA) {
-1205 return this.pubKey.verifyWithMessageHash(this.sHashHex, hSigVal);
-1206 // DSA
-1207 } else if (KJUR.crypto.DSA !== undefined &&
-1208 this.pubKey instanceof KJUR.crypto.DSA) {
-1209 return this.pubKey.verifyWithMessageHash(this.sHashHex, hSigVal);
-1210 } else {
-1211 throw "Signature: unsupported public key alg: " + this.pubkeyAlgName;
-1212 }
-1213 };
-1214 }
-1215 };
-1216
-1217 /**
-1218 * Initialize this object for signing or verifying depends on key
-1219 * @name init
-1220 * @memberOf KJUR.crypto.Signature#
-1221 * @function
-1222 * @param {Object} key specifying public or private key as plain/encrypted PKCS#5/8 PEM file, certificate PEM or {@link RSAKey}, {@link KJUR.crypto.DSA} or {@link KJUR.crypto.ECDSA} object
-1223 * @param {String} pass (OPTION) passcode for encrypted private key
-1224 * @since crypto 1.1.3
-1225 * @description
-1226 * This method is very useful initialize method for Signature class since
-1227 * you just specify key then this method will automatically initialize it
-1228 * using {@link KEYUTIL.getKey} method.
-1229 * As for 'key', following argument type are supported:
-1230 * <h5>signing</h5>
-1231 * <ul>
-1232 * <li>PEM formatted PKCS#8 encrypted RSA/ECDSA private key concluding "BEGIN ENCRYPTED PRIVATE KEY"</li>
-1233 * <li>PEM formatted PKCS#5 encrypted RSA/DSA private key concluding "BEGIN RSA/DSA PRIVATE KEY" and ",ENCRYPTED"</li>
-1234 * <li>PEM formatted PKCS#8 plain RSA/ECDSA private key concluding "BEGIN PRIVATE KEY"</li>
-1235 * <li>PEM formatted PKCS#5 plain RSA/DSA private key concluding "BEGIN RSA/DSA PRIVATE KEY" without ",ENCRYPTED"</li>
-1236 * <li>RSAKey object of private key</li>
-1237 * <li>KJUR.crypto.ECDSA object of private key</li>
-1238 * <li>KJUR.crypto.DSA object of private key</li>
-1239 * </ul>
-1240 * <h5>verification</h5>
-1241 * <ul>
-1242 * <li>PEM formatted PKCS#8 RSA/EC/DSA public key concluding "BEGIN PUBLIC KEY"</li>
-1243 * <li>PEM formatted X.509 certificate with RSA/EC/DSA public key concluding
-1244 * "BEGIN CERTIFICATE", "BEGIN X509 CERTIFICATE" or "BEGIN TRUSTED CERTIFICATE".</li>
-1245 * <li>RSAKey object of public key</li>
-1246 * <li>KJUR.crypto.ECDSA object of public key</li>
-1247 * <li>KJUR.crypto.DSA object of public key</li>
-1248 * </ul>
-1249 * @example
-1250 * sig.init(sCertPEM)
-1251 */
-1252 this.init = function(key, pass) {
-1253 throw "init(key, pass) not supported for this alg:prov=" +
-1254 this.algProvName;
-1255 };
-1256
-1257 /**
-1258 * Updates the data to be signed or verified by a string
-1259 * @name updateString
-1260 * @memberOf KJUR.crypto.Signature#
-1261 * @function
-1262 * @param {String} str string to use for the update
-1263 * @description
-1264 * @example
-1265 * sig.updateString('aaa')
-1266 */
-1267 this.updateString = function(str) {
-1268 throw "updateString(str) not supported for this alg:prov=" + this.algProvName;
-1269 };
-1270
-1271 /**
-1272 * Updates the data to be signed or verified by a hexadecimal string
-1273 * @name updateHex
-1274 * @memberOf KJUR.crypto.Signature#
-1275 * @function
-1276 * @param {String} hex hexadecimal string to use for the update
-1277 * @description
-1278 * @example
-1279 * sig.updateHex('1f2f3f')
-1280 */
-1281 this.updateHex = function(hex) {
-1282 throw "updateHex(hex) not supported for this alg:prov=" + this.algProvName;
-1283 };
-1284
-1285 /**
-1286 * Returns the signature bytes of all data updates as a hexadecimal string
-1287 * @name sign
-1288 * @memberOf KJUR.crypto.Signature#
-1289 * @function
-1290 * @return the signature bytes as a hexadecimal string
-1291 * @description
-1292 * @example
-1293 * var hSigValue = sig.sign()
-1294 */
-1295 this.sign = function() {
-1296 throw "sign() not supported for this alg:prov=" + this.algProvName;
-1297 };
-1298
-1299 /**
-1300 * performs final update on the sign using string, then returns the signature bytes of all data updates as a hexadecimal string
-1301 * @name signString
-1302 * @memberOf KJUR.crypto.Signature#
-1303 * @function
-1304 * @param {String} str string to final update
-1305 * @return the signature bytes of a hexadecimal string
-1306 * @description
-1307 * @example
-1308 * var hSigValue = sig.signString('aaa')
-1309 */
-1310 this.signString = function(str) {
-1311 throw "digestString(str) not supported for this alg:prov=" + this.algProvName;
-1312 };
-1313
-1314 /**
-1315 * performs final update on the sign using hexadecimal string, then returns the signature bytes of all data updates as a hexadecimal string
-1316 * @name signHex
-1317 * @memberOf KJUR.crypto.Signature#
-1318 * @function
-1319 * @param {String} hex hexadecimal string to final update
-1320 * @return the signature bytes of a hexadecimal string
-1321 * @description
-1322 * @example
-1323 * var hSigValue = sig.signHex('1fdc33')
-1324 */
-1325 this.signHex = function(hex) {
-1326 throw "digestHex(hex) not supported for this alg:prov=" + this.algProvName;
-1327 };
-1328
-1329 /**
-1330 * verifies the passed-in signature.
-1331 * @name verify
-1332 * @memberOf KJUR.crypto.Signature#
-1333 * @function
-1334 * @param {String} str string to final update
-1335 * @return {Boolean} true if the signature was verified, otherwise false
-1336 * @description
-1337 * @example
-1338 * var isValid = sig.verify('1fbcefdca4823a7(snip)')
-1339 */
-1340 this.verify = function(hSigVal) {
-1341 throw "verify(hSigVal) not supported for this alg:prov=" + this.algProvName;
-1342 };
-1343
-1344 this.initParams = params;
-1345
-1346 if (params !== undefined) {
-1347 if (params.alg !== undefined) {
-1348 this.algName = params.alg;
-1349 if (params.prov === undefined) {
-1350 this.provName = KJUR.crypto.Util.DEFAULTPROVIDER[this.algName];
-1351 } else {
-1352 this.provName = params.prov;
-1353 }
-1354 this.algProvName = this.algName + ":" + this.provName;
-1355 this.setAlgAndProvider(this.algName, this.provName);
-1356 this._setAlgNames();
-1357 }
-1358
-1359 if (params['psssaltlen'] !== undefined) this.pssSaltLen = params['psssaltlen'];
-1360
-1361 if (params.prvkeypem !== undefined) {
-1362 if (params.prvkeypas !== undefined) {
-1363 throw "both prvkeypem and prvkeypas parameters not supported";
-1364 } else {
-1365 try {
-1366 var prvKey = KEYUTIL.getKey(params.prvkeypem);
-1367 this.init(prvKey);
-1368 } catch (ex) {
-1369 throw "fatal error to load pem private key: " + ex;
-1370 }
-1371 }
-1372 }
-1373 }
-1374 };
-1375
-1376 // ====== Cipher class ============================================================
-1377 /**
-1378 * Cipher class to encrypt and decrypt data<br/>
-1379 * @name KJUR.crypto.Cipher
-1380 * @class Cipher class to encrypt and decrypt data<br/>
-1381 * @param {Array} params parameters for constructor
-1382 * @since jsrsasign 6.2.0 crypto 1.1.10
-1383 * @description
-1384 * Here is supported canonicalized cipher algorithm names and its standard names:
-1385 * <ul>
-1386 * <li>RSA - RSA/ECB/PKCS1Padding (default for RSAKey)</li>
-1387 * <li>RSAOAEP - RSA/ECB/OAEPWithSHA-1AndMGF1Padding</li>
-1388 * <li>RSAOAEP224 - RSA/ECB/OAEPWithSHA-224AndMGF1Padding(*)</li>
-1389 * <li>RSAOAEP256 - RSA/ECB/OAEPWithSHA-256AndMGF1Padding</li>
-1390 * <li>RSAOAEP384 - RSA/ECB/OAEPWithSHA-384AndMGF1Padding(*)</li>
-1391 * <li>RSAOAEP512 - RSA/ECB/OAEPWithSHA-512AndMGF1Padding(*)</li>
-1392 * </ul>
-1393 * NOTE: (*) is not supported in Java JCE.<br/>
-1394 * Currently this class supports only RSA encryption and decryption
-1395 * based on RSAES-OAEP and RSAES-PKCS1-v1_5 scheme.
-1396 * However it is planning to implement also symmetric ciphers near in the future */
-1397 KJUR.crypto.Cipher = function(params) {
-1398 };
-1399
-1400 /**
+ 37 * <li>{@link KJUR.crypto.Util} - cryptographic utility functions and properties</li>
+ 38 * </ul>
+ 39 * NOTE: Please ignore method summary and document of this namespace. This caused by a bug of jsdoc2.
+ 40 * </p>
+ 41 * @name KJUR.crypto
+ 42 * @namespace
+ 43 */
+ 44 if (typeof KJUR.crypto == "undefined" || !KJUR.crypto) KJUR.crypto = {};
+ 45
+ 46 /**
+ 47 * static object for cryptographic function utilities
+ 48 * @name KJUR.crypto.Util
+ 49 * @class static object for cryptographic function utilities
+ 50 * @property {Array} DIGESTINFOHEAD PKCS#1 DigestInfo heading hexadecimal bytes for each hash algorithms
+ 51 * @property {Array} DEFAULTPROVIDER associative array of default provider name for each hash and signature algorithms
+ 52 * @description
+ 53 */
+ 54 KJUR.crypto.Util = new function() {
+ 55 this.DIGESTINFOHEAD = {
+ 56 'sha1': "3021300906052b0e03021a05000414",
+ 57 'sha224': "302d300d06096086480165030402040500041c",
+ 58 'sha256': "3031300d060960864801650304020105000420",
+ 59 'sha384': "3041300d060960864801650304020205000430",
+ 60 'sha512': "3051300d060960864801650304020305000440",
+ 61 'md2': "3020300c06082a864886f70d020205000410",
+ 62 'md5': "3020300c06082a864886f70d020505000410",
+ 63 'ripemd160': "3021300906052b2403020105000414",
+ 64 };
+ 65
+ 66 /*
+ 67 * @since crypto 1.1.1
+ 68 */
+ 69 this.DEFAULTPROVIDER = {
+ 70 'md5': 'cryptojs',
+ 71 'sha1': 'cryptojs',
+ 72 'sha224': 'cryptojs',
+ 73 'sha256': 'cryptojs',
+ 74 'sha384': 'cryptojs',
+ 75 'sha512': 'cryptojs',
+ 76 'ripemd160': 'cryptojs',
+ 77 'hmacmd5': 'cryptojs',
+ 78 'hmacsha1': 'cryptojs',
+ 79 'hmacsha224': 'cryptojs',
+ 80 'hmacsha256': 'cryptojs',
+ 81 'hmacsha384': 'cryptojs',
+ 82 'hmacsha512': 'cryptojs',
+ 83 'hmacripemd160': 'cryptojs',
+ 84
+ 85 'MD5withRSA': 'cryptojs/jsrsa',
+ 86 'SHA1withRSA': 'cryptojs/jsrsa',
+ 87 'SHA224withRSA': 'cryptojs/jsrsa',
+ 88 'SHA256withRSA': 'cryptojs/jsrsa',
+ 89 'SHA384withRSA': 'cryptojs/jsrsa',
+ 90 'SHA512withRSA': 'cryptojs/jsrsa',
+ 91 'RIPEMD160withRSA': 'cryptojs/jsrsa',
+ 92
+ 93 'MD5withECDSA': 'cryptojs/jsrsa',
+ 94 'SHA1withECDSA': 'cryptojs/jsrsa',
+ 95 'SHA224withECDSA': 'cryptojs/jsrsa',
+ 96 'SHA256withECDSA': 'cryptojs/jsrsa',
+ 97 'SHA384withECDSA': 'cryptojs/jsrsa',
+ 98 'SHA512withECDSA': 'cryptojs/jsrsa',
+ 99 'RIPEMD160withECDSA': 'cryptojs/jsrsa',
+100
+101 'SHA1withDSA': 'cryptojs/jsrsa',
+102 'SHA224withDSA': 'cryptojs/jsrsa',
+103 'SHA256withDSA': 'cryptojs/jsrsa',
+104
+105 'MD5withRSAandMGF1': 'cryptojs/jsrsa',
+106 'SHAwithRSAandMGF1': 'cryptojs/jsrsa',
+107 'SHA1withRSAandMGF1': 'cryptojs/jsrsa',
+108 'SHA224withRSAandMGF1': 'cryptojs/jsrsa',
+109 'SHA256withRSAandMGF1': 'cryptojs/jsrsa',
+110 'SHA384withRSAandMGF1': 'cryptojs/jsrsa',
+111 'SHA512withRSAandMGF1': 'cryptojs/jsrsa',
+112 'RIPEMD160withRSAandMGF1': 'cryptojs/jsrsa',
+113 };
+114
+115 /*
+116 * @since crypto 1.1.2
+117 */
+118 this.CRYPTOJSMESSAGEDIGESTNAME = {
+119 'md5': CryptoJS.algo.MD5,
+120 'sha1': CryptoJS.algo.SHA1,
+121 'sha224': CryptoJS.algo.SHA224,
+122 'sha256': CryptoJS.algo.SHA256,
+123 'sha384': CryptoJS.algo.SHA384,
+124 'sha512': CryptoJS.algo.SHA512,
+125 'ripemd160': CryptoJS.algo.RIPEMD160
+126 };
+127
+128 /**
+129 * get hexadecimal DigestInfo
+130 * @name getDigestInfoHex
+131 * @memberOf KJUR.crypto.Util
+132 * @function
+133 * @param {String} hHash hexadecimal hash value
+134 * @param {String} alg hash algorithm name (ex. 'sha1')
+135 * @return {String} hexadecimal string DigestInfo ASN.1 structure
+136 */
+137 this.getDigestInfoHex = function(hHash, alg) {
+138 if (typeof this.DIGESTINFOHEAD[alg] == "undefined")
+139 throw "alg not supported in Util.DIGESTINFOHEAD: " + alg;
+140 return this.DIGESTINFOHEAD[alg] + hHash;
+141 };
+142
+143 /**
+144 * get PKCS#1 padded hexadecimal DigestInfo
+145 * @name getPaddedDigestInfoHex
+146 * @memberOf KJUR.crypto.Util
+147 * @function
+148 * @param {String} hHash hexadecimal hash value of message to be signed
+149 * @param {String} alg hash algorithm name (ex. 'sha1')
+150 * @param {Integer} keySize key bit length (ex. 1024)
+151 * @return {String} hexadecimal string of PKCS#1 padded DigestInfo
+152 */
+153 this.getPaddedDigestInfoHex = function(hHash, alg, keySize) {
+154 var hDigestInfo = this.getDigestInfoHex(hHash, alg);
+155 var pmStrLen = keySize / 4; // minimum PM length
+156
+157 if (hDigestInfo.length + 22 > pmStrLen) // len(0001+ff(*8)+00+hDigestInfo)=22
+158 throw "key is too short for SigAlg: keylen=" + keySize + "," + alg;
+159
+160 var hHead = "0001";
+161 var hTail = "00" + hDigestInfo;
+162 var hMid = "";
+163 var fLen = pmStrLen - hHead.length - hTail.length;
+164 for (var i = 0; i < fLen; i += 2) {
+165 hMid += "ff";
+166 }
+167 var hPaddedMessage = hHead + hMid + hTail;
+168 return hPaddedMessage;
+169 };
+170
+171 /**
+172 * get hexadecimal hash of string with specified algorithm
+173 * @name hashString
+174 * @memberOf KJUR.crypto.Util
+175 * @function
+176 * @param {String} s raw input string to be hashed
+177 * @param {String} alg hash algorithm name
+178 * @return {String} hexadecimal string of hash value
+179 * @since 1.1.1
+180 */
+181 this.hashString = function(s, alg) {
+182 var md = new KJUR.crypto.MessageDigest({'alg': alg});
+183 return md.digestString(s);
+184 };
+185
+186 /**
+187 * get hexadecimal hash of hexadecimal string with specified algorithm
+188 * @name hashHex
+189 * @memberOf KJUR.crypto.Util
+190 * @function
+191 * @param {String} sHex input hexadecimal string to be hashed
+192 * @param {String} alg hash algorithm name
+193 * @return {String} hexadecimal string of hash value
+194 * @since 1.1.1
+195 */
+196 this.hashHex = function(sHex, alg) {
+197 var md = new KJUR.crypto.MessageDigest({'alg': alg});
+198 return md.digestHex(sHex);
+199 };
+200
+201 /**
+202 * get hexadecimal SHA1 hash of string
+203 * @name sha1
+204 * @memberOf KJUR.crypto.Util
+205 * @function
+206 * @param {String} s raw input string to be hashed
+207 * @return {String} hexadecimal string of hash value
+208 * @since 1.0.3
+209 */
+210 this.sha1 = function(s) {
+211 return this.hashString(s, 'sha1');
+212 };
+213
+214 /**
+215 * get hexadecimal SHA256 hash of string
+216 * @name sha256
+217 * @memberOf KJUR.crypto.Util
+218 * @function
+219 * @param {String} s raw input string to be hashed
+220 * @return {String} hexadecimal string of hash value
+221 * @since 1.0.3
+222 */
+223 this.sha256 = function(s) {
+224 return this.hashString(s, 'sha256');
+225 };
+226
+227 this.sha256Hex = function(s) {
+228 return this.hashHex(s, 'sha256');
+229 };
+230
+231 /**
+232 * get hexadecimal SHA512 hash of string
+233 * @name sha512
+234 * @memberOf KJUR.crypto.Util
+235 * @function
+236 * @param {String} s raw input string to be hashed
+237 * @return {String} hexadecimal string of hash value
+238 * @since 1.0.3
+239 */
+240 this.sha512 = function(s) {
+241 return this.hashString(s, 'sha512');
+242 };
+243
+244 this.sha512Hex = function(s) {
+245 return this.hashHex(s, 'sha512');
+246 };
+247
+248 /**
+249 * check if key object (RSA/DSA/ECDSA) or not
+250 * @name isKey
+251 * @memberOf KJUR.crypto.Util
+252 * @function
+253 * @param {Object} obj any type argument to be checked
+254 * @return {Boolean} true if this is key object otherwise false
+255 * @since 1.0.3
+256 */
+257 this.isKey = function(obj) {
+258 if (obj instanceof RSAKey ||
+259 obj instanceof KJUR.crypto.DSA ||
+260 obj instanceof KJUR.crypto.ECDSA) {
+261 return true;
+262 } else {
+263 return false;
+264 }
+265 };
+266 };
+267
+268 /**
+269 * get hexadecimal MD5 hash of string
+270 * @name md5
+271 * @memberOf KJUR.crypto.Util
+272 * @function
+273 * @param {String} s input string to be hashed
+274 * @return {String} hexadecimal string of hash value
+275 * @since 1.0.3
+276 * @example
+277 * Util.md5('aaa') → 47bce5c74f589f4867dbd57e9ca9f808
+278 */
+279 KJUR.crypto.Util.md5 = function(s) {
+280 var md = new KJUR.crypto.MessageDigest({'alg':'md5', 'prov':'cryptojs'});
+281 return md.digestString(s);
+282 };
+283
+284 /**
+285 * get hexadecimal RIPEMD160 hash of string
+286 * @name ripemd160
+287 * @memberOf KJUR.crypto.Util
+288 * @function
+289 * @param {String} s input string to be hashed
+290 * @return {String} hexadecimal string of hash value
+291 * @since 1.0.3
+292 * @example
+293 * KJUR.crypto.Util.ripemd160("aaa") → 08889bd7b151aa174c21f33f59147fa65381edea
+294 */
+295 KJUR.crypto.Util.ripemd160 = function(s) {
+296 var md = new KJUR.crypto.MessageDigest({'alg':'ripemd160', 'prov':'cryptojs'});
+297 return md.digestString(s);
+298 };
+299
+300 // @since jsrsasign 7.0.0 crypto 1.1.11
+301 KJUR.crypto.Util.SECURERANDOMGEN = new SecureRandom();
+302
+303 /**
+304 * get hexadecimal string of random value from with specified byte length<br/>
+305 * @name getRandomHexOfNbytes
+306 * @memberOf KJUR.crypto.Util
+307 * @function
+308 * @param {Integer} n length of bytes of random
+309 * @return {String} hexadecimal string of random
+310 * @since jsrsasign 7.0.0 crypto 1.1.11
+311 * @example
+312 * KJUR.crypto.Util.getRandomHexOfNbytes(3) → "6314af", "000000" or "001fb4"
+313 * KJUR.crypto.Util.getRandomHexOfNbytes(128) → "8fbc..." in 1024bits
+314 */
+315 KJUR.crypto.Util.getRandomHexOfNbytes = function(n) {
+316 var ba = new Array(n);
+317 KJUR.crypto.Util.SECURERANDOMGEN.nextBytes(ba);
+318 return BAtohex(ba);
+319 };
+320
+321 /**
+322 * get BigInteger object of random value from with specified byte length<br/>
+323 * @name getRandomBigIntegerOfNbytes
+324 * @memberOf KJUR.crypto.Util
+325 * @function
+326 * @param {Integer} n length of bytes of random
+327 * @return {BigInteger} BigInteger object of specified random value
+328 * @since jsrsasign 7.0.0 crypto 1.1.11
+329 * @example
+330 * KJUR.crypto.Util.getRandomBigIntegerOfNbytes(3) → 6314af of BigInteger
+331 * KJUR.crypto.Util.getRandomBigIntegerOfNbytes(128) → 8fbc... of BigInteger
+332 */
+333 KJUR.crypto.Util.getRandomBigIntegerOfNbytes = function(n) {
+334 return new BigInteger(KJUR.crypto.Util.getRandomHexOfNbytes(n), 16);
+335 };
+336
+337 /**
+338 * get hexadecimal string of random value from with specified bit length<br/>
+339 * @name getRandomHexOfNbits
+340 * @memberOf KJUR.crypto.Util
+341 * @function
+342 * @param {Integer} n length of bits of random
+343 * @return {String} hexadecimal string of random
+344 * @since jsrsasign 7.0.0 crypto 1.1.11
+345 * @example
+346 * KJUR.crypto.Util.getRandomHexOfNbits(24) → "6314af", "000000" or "001fb4"
+347 * KJUR.crypto.Util.getRandomHexOfNbits(1024) → "8fbc..." in 1024bits
+348 */
+349 KJUR.crypto.Util.getRandomHexOfNbits = function(n) {
+350 var n_remainder = n % 8;
+351 var n_quotient = (n - n_remainder) / 8;
+352 var ba = new Array(n_quotient + 1);
+353 KJUR.crypto.Util.SECURERANDOMGEN.nextBytes(ba);
+354 ba[0] = (((255 << n_remainder) & 255) ^ 255) & ba[0];
+355 return BAtohex(ba);
+356 };
+357
+358 /**
+359 * get BigInteger object of random value from with specified bit length<br/>
+360 * @name getRandomBigIntegerOfNbits
+361 * @memberOf KJUR.crypto.Util
+362 * @function
+363 * @param {Integer} n length of bits of random
+364 * @return {BigInteger} BigInteger object of specified random value
+365 * @since jsrsasign 7.0.0 crypto 1.1.11
+366 * @example
+367 * KJUR.crypto.Util.getRandomBigIntegerOfNbits(24) → 6314af of BigInteger
+368 * KJUR.crypto.Util.getRandomBigIntegerOfNbits(1024) → 8fbc... of BigInteger
+369 */
+370 KJUR.crypto.Util.getRandomBigIntegerOfNbits = function(n) {
+371 return new BigInteger(KJUR.crypto.Util.getRandomHexOfNbits(n), 16);
+372 };
+373
+374 /**
+375 * get BigInteger object of random value from zero to max value<br/>
+376 * @name getRandomBigIntegerZeroToMax
+377 * @memberOf KJUR.crypto.Util
+378 * @function
+379 * @param {BigInteger} biMax max value of BigInteger object for random value
+380 * @return {BigInteger} BigInteger object of specified random value
+381 * @since jsrsasign 7.0.0 crypto 1.1.11
+382 * @description
+383 * This static method generates a BigInteger object with random value
+384 * greater than or equal to zero and smaller than or equal to biMax
+385 * (i.e. 0 ≤ result ≤ biMax).
+386 * @example
+387 * biMax = new BigInteger("3fa411...", 16);
+388 * KJUR.crypto.Util.getRandomBigIntegerZeroToMax(biMax) → 8fbc... of BigInteger
+389 */
+390 KJUR.crypto.Util.getRandomBigIntegerZeroToMax = function(biMax) {
+391 var bitLenMax = biMax.bitLength();
+392 while (1) {
+393 var biRand = KJUR.crypto.Util.getRandomBigIntegerOfNbits(bitLenMax);
+394 if (biMax.compareTo(biRand) != -1) return biRand;
+395 }
+396 };
+397
+398 /**
+399 * get BigInteger object of random value from min value to max value<br/>
+400 * @name getRandomBigIntegerMinToMax
+401 * @memberOf KJUR.crypto.Util
+402 * @function
+403 * @param {BigInteger} biMin min value of BigInteger object for random value
+404 * @param {BigInteger} biMax max value of BigInteger object for random value
+405 * @return {BigInteger} BigInteger object of specified random value
+406 * @since jsrsasign 7.0.0 crypto 1.1.11
+407 * @description
+408 * This static method generates a BigInteger object with random value
+409 * greater than or equal to biMin and smaller than or equal to biMax
+410 * (i.e. biMin ≤ result ≤ biMax).
+411 * @example
+412 * biMin = new BigInteger("2fa411...", 16);
+413 * biMax = new BigInteger("3fa411...", 16);
+414 * KJUR.crypto.Util.getRandomBigIntegerMinToMax(biMin, biMax) → 32f1... of BigInteger
+415 */
+416 KJUR.crypto.Util.getRandomBigIntegerMinToMax = function(biMin, biMax) {
+417 var flagCompare = biMin.compareTo(biMax);
+418 if (flagCompare == 1) throw "biMin is greater than biMax";
+419 if (flagCompare == 0) return biMin;
+420
+421 var biDiff = biMax.subtract(biMin);
+422 var biRand = KJUR.crypto.Util.getRandomBigIntegerZeroToMax(biDiff);
+423 return biRand.add(biMin);
+424 };
+425
+426 // === Mac ===============================================================
+427
+428 /**
+429 * MessageDigest class which is very similar to java.security.MessageDigest class<br/>
+430 * @name KJUR.crypto.MessageDigest
+431 * @class MessageDigest class which is very similar to java.security.MessageDigest class
+432 * @param {Array} params parameters for constructor
+433 * @property {Array} HASHLENGTH static Array of resulted byte length of hash (ex. HASHLENGTH["sha1"] == 20)
+434 * @description
+435 * <br/>
+436 * Currently this supports following algorithm and providers combination:
+437 * <ul>
+438 * <li>md5 - cryptojs</li>
+439 * <li>sha1 - cryptojs</li>
+440 * <li>sha224 - cryptojs</li>
+441 * <li>sha256 - cryptojs</li>
+442 * <li>sha384 - cryptojs</li>
+443 * <li>sha512 - cryptojs</li>
+444 * <li>ripemd160 - cryptojs</li>
+445 * <li>sha256 - sjcl (NEW from crypto.js 1.0.4)</li>
+446 * </ul>
+447 * @example
+448 * // CryptoJS provider sample
+449 * var md = new KJUR.crypto.MessageDigest({alg: "sha1", prov: "cryptojs"});
+450 * md.updateString('aaa')
+451 * var mdHex = md.digest()
+452 *
+453 * // SJCL(Stanford JavaScript Crypto Library) provider sample
+454 * var md = new KJUR.crypto.MessageDigest({alg: "sha256", prov: "sjcl"}); // sjcl supports sha256 only
+455 * md.updateString('aaa')
+456 * var mdHex = md.digest()
+457 *
+458 * // HASHLENGTH property
+459 * KJUR.crypto.MessageDigest.HASHLENGTH['sha1'] &rarr 20
+460 * KJUR.crypto.MessageDigest.HASHLENGTH['sha512'] &rarr 64
+461 */
+462 KJUR.crypto.MessageDigest = function(params) {
+463 var md = null;
+464 var algName = null;
+465 var provName = null;
+466
+467 /**
+468 * set hash algorithm and provider<br/>
+469 * @name setAlgAndProvider
+470 * @memberOf KJUR.crypto.MessageDigest#
+471 * @function
+472 * @param {String} alg hash algorithm name
+473 * @param {String} prov provider name
+474 * @description
+475 * This methods set an algorithm and a cryptographic provider.<br/>
+476 * Here is acceptable algorithm names ignoring cases and hyphens:
+477 * <ul>
+478 * <li>MD5</li>
+479 * <li>SHA1</li>
+480 * <li>SHA224</li>
+481 * <li>SHA256</li>
+482 * <li>SHA384</li>
+483 * <li>SHA512</li>
+484 * <li>RIPEMD160</li>
+485 * </ul>
+486 * NOTE: Since jsrsasign 6.2.0 crypto 1.1.10, this method ignores
+487 * upper or lower cases. Also any hyphens (i.e. "-") will be ignored
+488 * so that "SHA1" or "SHA-1" will be acceptable.
+489 * @example
+490 * // for SHA1
+491 * md.setAlgAndProvider('sha1', 'cryptojs');
+492 * md.setAlgAndProvider('SHA1');
+493 * // for RIPEMD160
+494 * md.setAlgAndProvider('ripemd160', 'cryptojs');
+495 */
+496 this.setAlgAndProvider = function(alg, prov) {
+497 alg = KJUR.crypto.MessageDigest.getCanonicalAlgName(alg);
+498
+499 if (alg !== null && prov === undefined) prov = KJUR.crypto.Util.DEFAULTPROVIDER[alg];
+500
+501 // for cryptojs
+502 if (':md5:sha1:sha224:sha256:sha384:sha512:ripemd160:'.indexOf(alg) != -1 &&
+503 prov == 'cryptojs') {
+504 try {
+505 this.md = KJUR.crypto.Util.CRYPTOJSMESSAGEDIGESTNAME[alg].create();
+506 } catch (ex) {
+507 throw "setAlgAndProvider hash alg set fail alg=" + alg + "/" + ex;
+508 }
+509 this.updateString = function(str) {
+510 this.md.update(str);
+511 };
+512 this.updateHex = function(hex) {
+513 var wHex = CryptoJS.enc.Hex.parse(hex);
+514 this.md.update(wHex);
+515 };
+516 this.digest = function() {
+517 var hash = this.md.finalize();
+518 return hash.toString(CryptoJS.enc.Hex);
+519 };
+520 this.digestString = function(str) {
+521 this.updateString(str);
+522 return this.digest();
+523 };
+524 this.digestHex = function(hex) {
+525 this.updateHex(hex);
+526 return this.digest();
+527 };
+528 }
+529 if (':sha256:'.indexOf(alg) != -1 &&
+530 prov == 'sjcl') {
+531 try {
+532 this.md = new sjcl.hash.sha256();
+533 } catch (ex) {
+534 throw "setAlgAndProvider hash alg set fail alg=" + alg + "/" + ex;
+535 }
+536 this.updateString = function(str) {
+537 this.md.update(str);
+538 };
+539 this.updateHex = function(hex) {
+540 var baHex = sjcl.codec.hex.toBits(hex);
+541 this.md.update(baHex);
+542 };
+543 this.digest = function() {
+544 var hash = this.md.finalize();
+545 return sjcl.codec.hex.fromBits(hash);
+546 };
+547 this.digestString = function(str) {
+548 this.updateString(str);
+549 return this.digest();
+550 };
+551 this.digestHex = function(hex) {
+552 this.updateHex(hex);
+553 return this.digest();
+554 };
+555 }
+556 };
+557
+558 /**
+559 * update digest by specified string
+560 * @name updateString
+561 * @memberOf KJUR.crypto.MessageDigest#
+562 * @function
+563 * @param {String} str string to update
+564 * @description
+565 * @example
+566 * md.updateString('New York');
+567 */
+568 this.updateString = function(str) {
+569 throw "updateString(str) not supported for this alg/prov: " + this.algName + "/" + this.provName;
+570 };
+571
+572 /**
+573 * update digest by specified hexadecimal string
+574 * @name updateHex
+575 * @memberOf KJUR.crypto.MessageDigest#
+576 * @function
+577 * @param {String} hex hexadecimal string to update
+578 * @description
+579 * @example
+580 * md.updateHex('0afe36');
+581 */
+582 this.updateHex = function(hex) {
+583 throw "updateHex(hex) not supported for this alg/prov: " + this.algName + "/" + this.provName;
+584 };
+585
+586 /**
+587 * completes hash calculation and returns hash result
+588 * @name digest
+589 * @memberOf KJUR.crypto.MessageDigest#
+590 * @function
+591 * @description
+592 * @example
+593 * md.digest()
+594 */
+595 this.digest = function() {
+596 throw "digest() not supported for this alg/prov: " + this.algName + "/" + this.provName;
+597 };
+598
+599 /**
+600 * performs final update on the digest using string, then completes the digest computation
+601 * @name digestString
+602 * @memberOf KJUR.crypto.MessageDigest#
+603 * @function
+604 * @param {String} str string to final update
+605 * @description
+606 * @example
+607 * md.digestString('aaa')
+608 */
+609 this.digestString = function(str) {
+610 throw "digestString(str) not supported for this alg/prov: " + this.algName + "/" + this.provName;
+611 };
+612
+613 /**
+614 * performs final update on the digest using hexadecimal string, then completes the digest computation
+615 * @name digestHex
+616 * @memberOf KJUR.crypto.MessageDigest#
+617 * @function
+618 * @param {String} hex hexadecimal string to final update
+619 * @description
+620 * @example
+621 * md.digestHex('0f2abd')
+622 */
+623 this.digestHex = function(hex) {
+624 throw "digestHex(hex) not supported for this alg/prov: " + this.algName + "/" + this.provName;
+625 };
+626
+627 if (params !== undefined) {
+628 if (params['alg'] !== undefined) {
+629 this.algName = params['alg'];
+630 if (params['prov'] === undefined)
+631 this.provName = KJUR.crypto.Util.DEFAULTPROVIDER[this.algName];
+632 this.setAlgAndProvider(this.algName, this.provName);
+633 }
+634 }
+635 };
+636
+637 /**
+638 * get canonical hash algorithm name<br/>
+639 * @name getCanonicalAlgName
+640 * @memberOf KJUR.crypto.MessageDigest
+641 * @function
+642 * @param {String} alg hash algorithm name (ex. MD5, SHA-1, SHA1, SHA512 et.al.)
+643 * @return {String} canonical hash algorithm name
+644 * @since jsrsasign 6.2.0 crypto 1.1.10
+645 * @description
+646 * This static method normalizes from any hash algorithm name such as
+647 * "SHA-1", "SHA1", "MD5", "sha512" to lower case name without hyphens
+648 * such as "sha1".
+649 * @example
+650 * KJUR.crypto.MessageDigest.getCanonicalAlgName("SHA-1") &rarr "sha1"
+651 * KJUR.crypto.MessageDigest.getCanonicalAlgName("MD5") &rarr "md5"
+652 */
+653 KJUR.crypto.MessageDigest.getCanonicalAlgName = function(alg) {
+654 if (typeof alg === "string") {
+655 alg = alg.toLowerCase();
+656 alg = alg.replace(/-/, '');
+657 }
+658 return alg;
+659 };
+660
+661 /**
+662 * get resulted hash byte length for specified algorithm name<br/>
+663 * @name getHashLength
+664 * @memberOf KJUR.crypto.MessageDigest
+665 * @function
+666 * @param {String} alg non-canonicalized hash algorithm name (ex. MD5, SHA-1, SHA1, SHA512 et.al.)
+667 * @return {Integer} resulted hash byte length
+668 * @since jsrsasign 6.2.0 crypto 1.1.10
+669 * @description
+670 * This static method returns resulted byte length for specified algorithm name such as "SHA-1".
+671 * @example
+672 * KJUR.crypto.MessageDigest.getHashLength("SHA-1") &rarr 20
+673 * KJUR.crypto.MessageDigest.getHashLength("sha1") &rarr 20
+674 */
+675 KJUR.crypto.MessageDigest.getHashLength = function(alg) {
+676 var MD = KJUR.crypto.MessageDigest
+677 var alg2 = MD.getCanonicalAlgName(alg);
+678 if (MD.HASHLENGTH[alg2] === undefined)
+679 throw "not supported algorithm: " + alg;
+680 return MD.HASHLENGTH[alg2];
+681 };
+682
+683 // described in KJUR.crypto.MessageDigest class (since jsrsasign 6.2.0 crypto 1.1.10)
+684 KJUR.crypto.MessageDigest.HASHLENGTH = {
+685 'md5': 16,
+686 'sha1': 20,
+687 'sha224': 28,
+688 'sha256': 32,
+689 'sha384': 48,
+690 'sha512': 64,
+691 'ripemd160': 20
+692 };
+693
+694 // === Mac ===============================================================
+695
+696 /**
+697 * Mac(Message Authentication Code) class which is very similar to java.security.Mac class
+698 * @name KJUR.crypto.Mac
+699 * @class Mac class which is very similar to java.security.Mac class
+700 * @param {Array} params parameters for constructor
+701 * @description
+702 * <br/>
+703 * Currently this supports following algorithm and providers combination:
+704 * <ul>
+705 * <li>hmacmd5 - cryptojs</li>
+706 * <li>hmacsha1 - cryptojs</li>
+707 * <li>hmacsha224 - cryptojs</li>
+708 * <li>hmacsha256 - cryptojs</li>
+709 * <li>hmacsha384 - cryptojs</li>
+710 * <li>hmacsha512 - cryptojs</li>
+711 * </ul>
+712 * NOTE: HmacSHA224 and HmacSHA384 issue was fixed since jsrsasign 4.1.4.
+713 * Please use 'ext/cryptojs-312-core-fix*.js' instead of 'core.js' of original CryptoJS
+714 * to avoid those issue.
+715 * <br/>
+716 * NOTE2: Hmac signature bug was fixed in jsrsasign 4.9.0 by providing CryptoJS
+717 * bug workaround.
+718 * <br/>
+719 * Please see {@link KJUR.crypto.Mac.setPassword}, how to provide password
+720 * in various ways in detail.
+721 * @example
+722 * var mac = new KJUR.crypto.Mac({alg: "HmacSHA256", "pass": "pass"});
+723 * mac.updateString('aaa')
+724 * mac.doFinal() → "5737da..."
+725 *
+726 * // other password representation
+727 * var mac = new KJUR.crypto.Mac({alg: "HmacSHA256", "pass": {"hex": "6161"}});
+728 * var mac = new KJUR.crypto.Mac({alg: "HmacSHA256", "pass": {"utf8": "aa"}});
+729 * var mac = new KJUR.crypto.Mac({alg: "HmacSHA256", "pass": {"rstr": "\x61\x61"}});
+730 * var mac = new KJUR.crypto.Mac({alg: "HmacSHA256", "pass": {"b64": "Mi02/+...a=="}});
+731 * var mac = new KJUR.crypto.Mac({alg: "HmacSHA256", "pass": {"b64u": "Mi02_-...a"}});
+732 */
+733 KJUR.crypto.Mac = function(params) {
+734 var mac = null;
+735 var pass = null;
+736 var algName = null;
+737 var provName = null;
+738 var algProv = null;
+739
+740 this.setAlgAndProvider = function(alg, prov) {
+741 alg = alg.toLowerCase();
+742
+743 if (alg == null) alg = "hmacsha1";
+744
+745 alg = alg.toLowerCase();
+746 if (alg.substr(0, 4) != "hmac") {
+747 throw "setAlgAndProvider unsupported HMAC alg: " + alg;
+748 }
+749
+750 if (prov === undefined) prov = KJUR.crypto.Util.DEFAULTPROVIDER[alg];
+751 this.algProv = alg + "/" + prov;
+752
+753 var hashAlg = alg.substr(4);
+754
+755 // for cryptojs
+756 if (':md5:sha1:sha224:sha256:sha384:sha512:ripemd160:'.indexOf(hashAlg) != -1 &&
+757 prov == 'cryptojs') {
+758 try {
+759 var mdObj = KJUR.crypto.Util.CRYPTOJSMESSAGEDIGESTNAME[hashAlg];
+760 this.mac = CryptoJS.algo.HMAC.create(mdObj, this.pass);
+761 } catch (ex) {
+762 throw "setAlgAndProvider hash alg set fail hashAlg=" + hashAlg + "/" + ex;
+763 }
+764 this.updateString = function(str) {
+765 this.mac.update(str);
+766 };
+767 this.updateHex = function(hex) {
+768 var wHex = CryptoJS.enc.Hex.parse(hex);
+769 this.mac.update(wHex);
+770 };
+771 this.doFinal = function() {
+772 var hash = this.mac.finalize();
+773 return hash.toString(CryptoJS.enc.Hex);
+774 };
+775 this.doFinalString = function(str) {
+776 this.updateString(str);
+777 return this.doFinal();
+778 };
+779 this.doFinalHex = function(hex) {
+780 this.updateHex(hex);
+781 return this.doFinal();
+782 };
+783 }
+784 };
+785
+786 /**
+787 * update digest by specified string<br/>
+788 * @name updateString
+789 * @memberOf KJUR.crypto.Mac#
+790 * @function
+791 * @param {String} str string to update
+792 *
+793 * @description
+794 * @example
+795 * var mac = new KJUR.crypto.Mac({alg: "HmacSHA256", "pass": "pass"});
+796 * mac.updateString('aaa')
+797 * mac.doFinal() → "5737da..."
+798 */
+799 this.updateString = function(str) {
+800 throw "updateString(str) not supported for this alg/prov: " + this.algProv;
+801 };
+802
+803 /**
+804 * update digest by specified hexadecimal string<br/>
+805 * @name updateHex
+806 * @memberOf KJUR.crypto.Mac#
+807 * @function
+808 * @param {String} hex hexadecimal string to update
+809 *
+810 * @description
+811 * @example
+812 * var mac = new KJUR.crypto.Mac({alg: "HmacSHA256", "pass": "pass"});
+813 * mac.updateHex('616161')
+814 * mac.doFinal() → "5737da..."
+815 */
+816 this.updateHex = function(hex) {
+817 throw "updateHex(hex) not supported for this alg/prov: " + this.algProv;
+818 };
+819
+820 /**
+821 * completes hash calculation and returns hash result<br/>
+822 * @name doFinal
+823 * @memberOf KJUR.crypto.Mac#
+824 * @function
+825 * @returns hexadecimal string of Mac result value
+826 *
+827 * @description
+828 * @example
+829 * var mac = new KJUR.crypto.Mac({alg: "HmacSHA256", "pass": "pass"});
+830 * mac.updateString('aaa')
+831 * mac.doFinal() → "5737da..."
+832 */
+833 this.doFinal = function() {
+834 throw "digest() not supported for this alg/prov: " + this.algProv;
+835 };
+836
+837 /**
+838 * performs final update on the digest using string, then completes the digest computation<br/>
+839 * @name doFinalString
+840 * @memberOf KJUR.crypto.Mac#
+841 * @function
+842 * @param {String} str raw string to final update
+843 * @returns hexadecimal string of Mac result value
+844 *
+845 * @description
+846 * @example
+847 * var mac = new KJUR.crypto.Mac({alg: "HmacSHA256", "pass": "pass"});
+848 * mac.doFinalString("aaa") → "5737da..."
+849 */
+850 this.doFinalString = function(str) {
+851 throw "digestString(str) not supported for this alg/prov: " + this.algProv;
+852 };
+853
+854 /**
+855 * performs final update on the digest using hexadecimal string, then completes the digest computation<br/>
+856 * @name doFinalHex
+857 * @memberOf KJUR.crypto.Mac#
+858 * @function
+859 * @param {String} hex hexadecimal string to final update
+860 * @returns hexadecimal string of Mac result value
+861 *
+862 * @description
+863 * @example
+864 * var mac = new KJUR.crypto.Mac({alg: "HmacSHA256", "pass": "pass"});
+865 * mac.doFinalHex("616161") → "5737da..."
+866 */
+867 this.doFinalHex = function(hex) {
+868 throw "digestHex(hex) not supported for this alg/prov: " + this.algProv;
+869 };
+870
+871 /**
+872 * set password for Mac<br/>
+873 * @name setPassword
+874 * @memberOf KJUR.crypto.Mac#
+875 * @function
+876 * @param {Object} pass password for Mac
+877 * @since crypto 1.1.7 jsrsasign 4.9.0
+878 * @description
+879 * This method will set password for (H)Mac internally.
+880 * Argument 'pass' can be specified as following:
+881 * <ul>
+882 * <li>even length string of 0..9, a..f or A-F: implicitly specified as hexadecimal string</li>
+883 * <li>not above string: implicitly specified as raw string</li>
+884 * <li>{rstr: "\x65\x70"}: explicitly specified as raw string</li>
+885 * <li>{hex: "6570"}: explicitly specified as hexacedimal string</li>
+886 * <li>{utf8: "秘密"}: explicitly specified as UTF8 string</li>
+887 * <li>{b64: "Mi78..=="}: explicitly specified as Base64 string</li>
+888 * <li>{b64u: "Mi7-_"}: explicitly specified as Base64URL string</li>
+889 * </ul>
+890 * It is *STRONGLY RECOMMENDED* that explicit representation of password argument
+891 * to avoid ambiguity. For example string "6161" can mean a string "6161" or
+892 * a hexadecimal string of "aa" (i.e. \x61\x61).
+893 * @example
+894 * mac = KJUR.crypto.Mac({'alg': 'hmacsha256'});
+895 * // set password by implicit raw string
+896 * mac.setPassword("\x65\x70\xb9\x0b");
+897 * mac.setPassword("password");
+898 * // set password by implicit hexadecimal string
+899 * mac.setPassword("6570b90b");
+900 * mac.setPassword("6570B90B");
+901 * // set password by explicit raw string
+902 * mac.setPassword({"rstr": "\x65\x70\xb9\x0b"});
+903 * // set password by explicit hexadecimal string
+904 * mac.setPassword({"hex": "6570b90b"});
+905 * // set password by explicit utf8 string
+906 * mac.setPassword({"utf8": "passwordパスワード");
+907 * // set password by explicit Base64 string
+908 * mac.setPassword({"b64": "Mb+c3f/=="});
+909 * // set password by explicit Base64URL string
+910 * mac.setPassword({"b64u": "Mb-c3f_"});
+911 */
+912 this.setPassword = function(pass) {
+913 // internal this.pass shall be CryptoJS DWord Object for CryptoJS bug
+914 // work around. CrytoJS HMac password can be passed by
+915 // raw string as described in the manual however it doesn't
+916 // work properly in some case. If password was passed
+917 // by CryptoJS DWord which is not described in the manual
+918 // it seems to work. (fixed since crypto 1.1.7)
+919
+920 if (typeof pass == 'string') {
+921 var hPass = pass;
+922 if (pass.length % 2 == 1 || ! pass.match(/^[0-9A-Fa-f]+$/)) { // raw str
+923 hPass = rstrtohex(pass);
+924 }
+925 this.pass = CryptoJS.enc.Hex.parse(hPass);
+926 return;
+927 }
+928
+929 if (typeof pass != 'object')
+930 throw "KJUR.crypto.Mac unsupported password type: " + pass;
+931
+932 var hPass = null;
+933 if (pass.hex !== undefined) {
+934 if (pass.hex.length % 2 != 0 || ! pass.hex.match(/^[0-9A-Fa-f]+$/))
+935 throw "Mac: wrong hex password: " + pass.hex;
+936 hPass = pass.hex;
+937 }
+938 if (pass.utf8 !== undefined) hPass = utf8tohex(pass.utf8);
+939 if (pass.rstr !== undefined) hPass = rstrtohex(pass.rstr);
+940 if (pass.b64 !== undefined) hPass = b64tohex(pass.b64);
+941 if (pass.b64u !== undefined) hPass = b64utohex(pass.b64u);
+942
+943 if (hPass == null)
+944 throw "KJUR.crypto.Mac unsupported password type: " + pass;
+945
+946 this.pass = CryptoJS.enc.Hex.parse(hPass);
+947 };
+948
+949 if (params !== undefined) {
+950 if (params.pass !== undefined) {
+951 this.setPassword(params.pass);
+952 }
+953 if (params.alg !== undefined) {
+954 this.algName = params.alg;
+955 if (params['prov'] === undefined)
+956 this.provName = KJUR.crypto.Util.DEFAULTPROVIDER[this.algName];
+957 this.setAlgAndProvider(this.algName, this.provName);
+958 }
+959 }
+960 };
+961
+962 // ====== Signature class ====================================================
+963 /**
+964 * Signature class which is very similar to java.security.Signature class
+965 * @name KJUR.crypto.Signature
+966 * @class Signature class which is very similar to java.security.Signature class
+967 * @param {Array} params parameters for constructor
+968 * @property {String} state Current state of this signature object whether 'SIGN', 'VERIFY' or null
+969 * @description
+970 * <br/>
+971 * As for params of constructor's argument, it can be specify following attributes:
+972 * <ul>
+973 * <li>alg - signature algorithm name (ex. {MD5,SHA1,SHA224,SHA256,SHA384,SHA512,RIPEMD160}with{RSA,ECDSA,DSA})</li>
+974 * <li>provider - currently 'cryptojs/jsrsa' only</li>
+975 * </ul>
+976 * <h4>SUPPORTED ALGORITHMS AND PROVIDERS</h4>
+977 * This Signature class supports following signature algorithm and provider names:
+978 * <ul>
+979 * <li>MD5withRSA - cryptojs/jsrsa</li>
+980 * <li>SHA1withRSA - cryptojs/jsrsa</li>
+981 * <li>SHA224withRSA - cryptojs/jsrsa</li>
+982 * <li>SHA256withRSA - cryptojs/jsrsa</li>
+983 * <li>SHA384withRSA - cryptojs/jsrsa</li>
+984 * <li>SHA512withRSA - cryptojs/jsrsa</li>
+985 * <li>RIPEMD160withRSA - cryptojs/jsrsa</li>
+986 * <li>MD5withECDSA - cryptojs/jsrsa</li>
+987 * <li>SHA1withECDSA - cryptojs/jsrsa</li>
+988 * <li>SHA224withECDSA - cryptojs/jsrsa</li>
+989 * <li>SHA256withECDSA - cryptojs/jsrsa</li>
+990 * <li>SHA384withECDSA - cryptojs/jsrsa</li>
+991 * <li>SHA512withECDSA - cryptojs/jsrsa</li>
+992 * <li>RIPEMD160withECDSA - cryptojs/jsrsa</li>
+993 * <li>MD5withRSAandMGF1 - cryptojs/jsrsa</li>
+994 * <li>SHAwithRSAandMGF1 - cryptojs/jsrsa</li>
+995 * <li>SHA1withRSAandMGF1 - cryptojs/jsrsa</li>
+996 * <li>SHA224withRSAandMGF1 - cryptojs/jsrsa</li>
+997 * <li>SHA256withRSAandMGF1 - cryptojs/jsrsa</li>
+998 * <li>SHA384withRSAandMGF1 - cryptojs/jsrsa</li>
+999 * <li>SHA512withRSAandMGF1 - cryptojs/jsrsa</li>
+1000 * <li>RIPEMD160withRSAandMGF1 - cryptojs/jsrsa</li>
+1001 * <li>SHA1withDSA - cryptojs/jsrsa</li>
+1002 * <li>SHA224withDSA - cryptojs/jsrsa</li>
+1003 * <li>SHA256withDSA - cryptojs/jsrsa</li>
+1004 * </ul>
+1005 * As for RSA-PSS signature algorithm names and signing parameters
+1006 * such as MGF function and salt length, please see
+1007 * {@link KJUR.asn1.x509.AlgorithmIdentifier} class.
+1008 *
+1009 * Here are supported elliptic cryptographic curve names and their aliases for ECDSA:
+1010 * <ul>
+1011 * <li>secp256k1</li>
+1012 * <li>secp256r1, NIST P-256, P-256, prime256v1</li>
+1013 * <li>secp384r1, NIST P-384, P-384</li>
+1014 * <li>secp521r1, NIST P-521, P-521</li>
+1015 * </ul>
+1016 * NOTE1: DSA signing algorithm is also supported since crypto 1.1.5.
+1017 * <h4>EXAMPLES</h4>
+1018 * @example
+1019 * // RSA signature generation
+1020 * var sig = new KJUR.crypto.Signature({"alg": "SHA1withRSA"});
+1021 * sig.init(prvKeyPEM);
+1022 * sig.updateString('aaa');
+1023 * var hSigVal = sig.sign();
+1024 *
+1025 * // DSA signature validation
+1026 * var sig2 = new KJUR.crypto.Signature({"alg": "SHA1withDSA"});
+1027 * sig2.init(certPEM);
+1028 * sig.updateString('aaa');
+1029 * var isValid = sig2.verify(hSigVal);
+1030 *
+1031 * // ECDSA signing
+1032 * var sig = new KJUR.crypto.Signature({'alg':'SHA1withECDSA'});
+1033 * sig.init(prvKeyPEM);
+1034 * sig.updateString('aaa');
+1035 * var sigValueHex = sig.sign();
+1036 *
+1037 * // ECDSA verifying
+1038 * var sig2 = new KJUR.crypto.Signature({'alg':'SHA1withECDSA'});
+1039 * sig.init(certPEM);
+1040 * sig.updateString('aaa');
+1041 * var isValid = sig.verify(sigValueHex);
+1042 */
+1043 KJUR.crypto.Signature = function(params) {
+1044 var prvKey = null; // RSAKey/KJUR.crypto.{ECDSA,DSA} object for signing
+1045 var pubKey = null; // RSAKey/KJUR.crypto.{ECDSA,DSA} object for verifying
+1046
+1047 var md = null; // KJUR.crypto.MessageDigest object
+1048 var sig = null;
+1049 var algName = null;
+1050 var provName = null;
+1051 var algProvName = null;
+1052 var mdAlgName = null;
+1053 var pubkeyAlgName = null; // rsa,ecdsa,rsaandmgf1(=rsapss)
+1054 var state = null;
+1055 var pssSaltLen = -1;
+1056 var initParams = null;
+1057
+1058 var sHashHex = null; // hex hash value for hex
+1059 var hDigestInfo = null;
+1060 var hPaddedDigestInfo = null;
+1061 var hSign = null;
+1062
+1063 this._setAlgNames = function() {
+1064 var matchResult = this.algName.match(/^(.+)with(.+)$/);
+1065 if (matchResult) {
+1066 this.mdAlgName = matchResult[1].toLowerCase();
+1067 this.pubkeyAlgName = matchResult[2].toLowerCase();
+1068 if (this.pubkeyAlgName == "rsaandmgf1" &&
+1069 this.mdAlgName == "sha") {
+1070 this.mdAlgName = "sha1";
+1071 }
+1072 }
+1073 };
+1074
+1075 this._zeroPaddingOfSignature = function(hex, bitLength) {
+1076 var s = "";
+1077 var nZero = bitLength / 4 - hex.length;
+1078 for (var i = 0; i < nZero; i++) {
+1079 s = s + "0";
+1080 }
+1081 return s + hex;
+1082 };
+1083
+1084 /**
+1085 * set signature algorithm and provider
+1086 * @name setAlgAndProvider
+1087 * @memberOf KJUR.crypto.Signature#
+1088 * @function
+1089 * @param {String} alg signature algorithm name
+1090 * @param {String} prov provider name
+1091 * @description
+1092 * @example
+1093 * md.setAlgAndProvider('SHA1withRSA', 'cryptojs/jsrsa');
+1094 */
+1095 this.setAlgAndProvider = function(alg, prov) {
+1096 this._setAlgNames();
+1097 if (prov != 'cryptojs/jsrsa')
+1098 throw new Error("provider not supported: " + prov);
+1099
+1100 if (':md5:sha1:sha224:sha256:sha384:sha512:ripemd160:'.indexOf(this.mdAlgName) != -1) {
+1101 try {
+1102 this.md = new KJUR.crypto.MessageDigest({'alg':this.mdAlgName});
+1103 } catch (ex) {
+1104 throw new Error("setAlgAndProvider hash alg set fail alg=" +
+1105 this.mdAlgName + "/" + ex);
+1106 }
+1107
+1108 this.init = function(keyparam, pass) {
+1109 var keyObj = null;
+1110 try {
+1111 if (pass === undefined) {
+1112 keyObj = KEYUTIL.getKey(keyparam);
+1113 } else {
+1114 keyObj = KEYUTIL.getKey(keyparam, pass);
+1115 }
+1116 } catch (ex) {
+1117 throw "init failed:" + ex;
+1118 }
+1119
+1120 if (keyObj.isPrivate === true) {
+1121 this.prvKey = keyObj;
+1122 this.state = "SIGN";
+1123 } else if (keyObj.isPublic === true) {
+1124 this.pubKey = keyObj;
+1125 this.state = "VERIFY";
+1126 } else {
+1127 throw "init failed.:" + keyObj;
+1128 }
+1129 };
+1130
+1131 this.updateString = function(str) {
+1132 this.md.updateString(str);
+1133 };
+1134
+1135 this.updateHex = function(hex) {
+1136 this.md.updateHex(hex);
+1137 };
+1138
+1139 this.sign = function() {
+1140 this.sHashHex = this.md.digest();
+1141 // hex parameter EC public key
+1142 if (this.prvKey === undefined &&
+1143 this.ecprvhex !== undefined &&
+1144 this.eccurvename !== undefined &&
+1145 KJUR.crypto.ECDSA !== undefined) {
+1146 this.prvKey = new KJUR.crypto.ECDSA({'curve': this.eccurvename,
+1147 prv: this.ecprvhex});
+1148 }
+1149
+1150 // RSAPSS
+1151 if (this.prvKey instanceof RSAKey &&
+1152 this.pubkeyAlgName === "rsaandmgf1") {
+1153 this.hSign = this.prvKey.signWithMessageHashPSS(this.sHashHex,
+1154 this.mdAlgName,
+1155 this.pssSaltLen);
+1156 // RSA
+1157 } else if (this.prvKey instanceof RSAKey &&
+1158 this.pubkeyAlgName === "rsa") {
+1159 this.hSign = this.prvKey.signWithMessageHash(this.sHashHex,
+1160 this.mdAlgName);
+1161 // ECDSA
+1162 } else if (this.prvKey instanceof KJUR.crypto.ECDSA) {
+1163 this.hSign = this.prvKey.signWithMessageHash(this.sHashHex);
+1164 // DSA
+1165 } else if (this.prvKey instanceof KJUR.crypto.DSA) {
+1166 this.hSign = this.prvKey.signWithMessageHash(this.sHashHex);
+1167 } else {
+1168 throw "Signature: unsupported private key alg: " + this.pubkeyAlgName;
+1169 }
+1170 return this.hSign;
+1171 };
+1172 this.signString = function(str) {
+1173 this.updateString(str);
+1174 return this.sign();
+1175 };
+1176 this.signHex = function(hex) {
+1177 this.updateHex(hex);
+1178 return this.sign();
+1179 };
+1180 this.verify = function(hSigVal) {
+1181 this.sHashHex = this.md.digest();
+1182 // hex parameter EC public key
+1183 if (this.pubKey === undefined &&
+1184 this.ecpubhex !== undefined &&
+1185 this.eccurvename !== undefined &&
+1186 KJUR.crypto.ECDSA !== undefined) {
+1187 this.pubKey = new KJUR.crypto.ECDSA({curve: this.eccurvename,
+1188 pub: this.ecpubhex});
+1189 }
+1190
+1191 // RSAPSS
+1192 if (this.pubKey instanceof RSAKey &&
+1193 this.pubkeyAlgName === "rsaandmgf1") {
+1194 return this.pubKey.verifyWithMessageHashPSS(this.sHashHex, hSigVal,
+1195 this.mdAlgName,
+1196 this.pssSaltLen);
+1197 // RSA
+1198 } else if (this.pubKey instanceof RSAKey &&
+1199 this.pubkeyAlgName === "rsa") {
+1200 return this.pubKey.verifyWithMessageHash(this.sHashHex, hSigVal);
+1201 // ECDSA
+1202 } else if (KJUR.crypto.ECDSA !== undefined &&
+1203 this.pubKey instanceof KJUR.crypto.ECDSA) {
+1204 return this.pubKey.verifyWithMessageHash(this.sHashHex, hSigVal);
+1205 // DSA
+1206 } else if (KJUR.crypto.DSA !== undefined &&
+1207 this.pubKey instanceof KJUR.crypto.DSA) {
+1208 return this.pubKey.verifyWithMessageHash(this.sHashHex, hSigVal);
+1209 } else {
+1210 throw "Signature: unsupported public key alg: " + this.pubkeyAlgName;
+1211 }
+1212 };
+1213 }
+1214 };
+1215
+1216 /**
+1217 * Initialize this object for signing or verifying depends on key
+1218 * @name init
+1219 * @memberOf KJUR.crypto.Signature#
+1220 * @function
+1221 * @param {Object} key specifying public or private key as plain/encrypted PKCS#5/8 PEM file, certificate PEM or {@link RSAKey}, {@link KJUR.crypto.DSA} or {@link KJUR.crypto.ECDSA} object
+1222 * @param {String} pass (OPTION) passcode for encrypted private key
+1223 * @since crypto 1.1.3
+1224 * @description
+1225 * This method is very useful initialize method for Signature class since
+1226 * you just specify key then this method will automatically initialize it
+1227 * using {@link KEYUTIL.getKey} method.
+1228 * As for 'key', following argument type are supported:
+1229 * <h5>signing</h5>
+1230 * <ul>
+1231 * <li>PEM formatted PKCS#8 encrypted RSA/ECDSA private key concluding "BEGIN ENCRYPTED PRIVATE KEY"</li>
+1232 * <li>PEM formatted PKCS#5 encrypted RSA/DSA private key concluding "BEGIN RSA/DSA PRIVATE KEY" and ",ENCRYPTED"</li>
+1233 * <li>PEM formatted PKCS#8 plain RSA/ECDSA private key concluding "BEGIN PRIVATE KEY"</li>
+1234 * <li>PEM formatted PKCS#5 plain RSA/DSA private key concluding "BEGIN RSA/DSA PRIVATE KEY" without ",ENCRYPTED"</li>
+1235 * <li>RSAKey object of private key</li>
+1236 * <li>KJUR.crypto.ECDSA object of private key</li>
+1237 * <li>KJUR.crypto.DSA object of private key</li>
+1238 * </ul>
+1239 * <h5>verification</h5>
+1240 * <ul>
+1241 * <li>PEM formatted PKCS#8 RSA/EC/DSA public key concluding "BEGIN PUBLIC KEY"</li>
+1242 * <li>PEM formatted X.509 certificate with RSA/EC/DSA public key concluding
+1243 * "BEGIN CERTIFICATE", "BEGIN X509 CERTIFICATE" or "BEGIN TRUSTED CERTIFICATE".</li>
+1244 * <li>RSAKey object of public key</li>
+1245 * <li>KJUR.crypto.ECDSA object of public key</li>
+1246 * <li>KJUR.crypto.DSA object of public key</li>
+1247 * </ul>
+1248 * @example
+1249 * sig.init(sCertPEM)
+1250 */
+1251 this.init = function(key, pass) {
+1252 throw "init(key, pass) not supported for this alg:prov=" +
+1253 this.algProvName;
+1254 };
+1255
+1256 /**
+1257 * Updates the data to be signed or verified by a string
+1258 * @name updateString
+1259 * @memberOf KJUR.crypto.Signature#
+1260 * @function
+1261 * @param {String} str string to use for the update
+1262 * @description
+1263 * @example
+1264 * sig.updateString('aaa')
+1265 */
+1266 this.updateString = function(str) {
+1267 throw "updateString(str) not supported for this alg:prov=" + this.algProvName;
+1268 };
+1269
+1270 /**
+1271 * Updates the data to be signed or verified by a hexadecimal string
+1272 * @name updateHex
+1273 * @memberOf KJUR.crypto.Signature#
+1274 * @function
+1275 * @param {String} hex hexadecimal string to use for the update
+1276 * @description
+1277 * @example
+1278 * sig.updateHex('1f2f3f')
+1279 */
+1280 this.updateHex = function(hex) {
+1281 throw "updateHex(hex) not supported for this alg:prov=" + this.algProvName;
+1282 };
+1283
+1284 /**
+1285 * Returns the signature bytes of all data updates as a hexadecimal string
+1286 * @name sign
+1287 * @memberOf KJUR.crypto.Signature#
+1288 * @function
+1289 * @return the signature bytes as a hexadecimal string
+1290 * @description
+1291 * @example
+1292 * var hSigValue = sig.sign()
+1293 */
+1294 this.sign = function() {
+1295 throw "sign() not supported for this alg:prov=" + this.algProvName;
+1296 };
+1297
+1298 /**
+1299 * performs final update on the sign using string, then returns the signature bytes of all data updates as a hexadecimal string
+1300 * @name signString
+1301 * @memberOf KJUR.crypto.Signature#
+1302 * @function
+1303 * @param {String} str string to final update
+1304 * @return the signature bytes of a hexadecimal string
+1305 * @description
+1306 * @example
+1307 * var hSigValue = sig.signString('aaa')
+1308 */
+1309 this.signString = function(str) {
+1310 throw "digestString(str) not supported for this alg:prov=" + this.algProvName;
+1311 };
+1312
+1313 /**
+1314 * performs final update on the sign using hexadecimal string, then returns the signature bytes of all data updates as a hexadecimal string
+1315 * @name signHex
+1316 * @memberOf KJUR.crypto.Signature#
+1317 * @function
+1318 * @param {String} hex hexadecimal string to final update
+1319 * @return the signature bytes of a hexadecimal string
+1320 * @description
+1321 * @example
+1322 * var hSigValue = sig.signHex('1fdc33')
+1323 */
+1324 this.signHex = function(hex) {
+1325 throw "digestHex(hex) not supported for this alg:prov=" + this.algProvName;
+1326 };
+1327
+1328 /**
+1329 * verifies the passed-in signature.
+1330 * @name verify
+1331 * @memberOf KJUR.crypto.Signature#
+1332 * @function
+1333 * @param {String} str string to final update
+1334 * @return {Boolean} true if the signature was verified, otherwise false
+1335 * @description
+1336 * @example
+1337 * var isValid = sig.verify('1fbcefdca4823a7(snip)')
+1338 */
+1339 this.verify = function(hSigVal) {
+1340 throw "verify(hSigVal) not supported for this alg:prov=" + this.algProvName;
+1341 };
+1342
+1343 this.initParams = params;
+1344
+1345 if (params !== undefined) {
+1346 if (params.alg !== undefined) {
+1347 this.algName = params.alg;
+1348 if (params.prov === undefined) {
+1349 this.provName = KJUR.crypto.Util.DEFAULTPROVIDER[this.algName];
+1350 } else {
+1351 this.provName = params.prov;
+1352 }
+1353 this.algProvName = this.algName + ":" + this.provName;
+1354 this.setAlgAndProvider(this.algName, this.provName);
+1355 this._setAlgNames();
+1356 }
+1357
+1358 if (params['psssaltlen'] !== undefined) this.pssSaltLen = params['psssaltlen'];
+1359
+1360 if (params.prvkeypem !== undefined) {
+1361 if (params.prvkeypas !== undefined) {
+1362 throw "both prvkeypem and prvkeypas parameters not supported";
+1363 } else {
+1364 try {
+1365 var prvKey = KEYUTIL.getKey(params.prvkeypem);
+1366 this.init(prvKey);
+1367 } catch (ex) {
+1368 throw "fatal error to load pem private key: " + ex;
+1369 }
+1370 }
+1371 }
+1372 }
+1373 };
+1374
+1375 // ====== Cipher class ============================================================
+1376 /*
+1377 * Cipher class to encrypt and decrypt data<br/>
+1378 * @name KJUR.crypto.Cipher
+1379 * @class Cipher class to encrypt and decrypt data<br/>
+1380 * @param {Array} params parameters for constructor
+1381 * @since jsrsasign 6.2.0 crypto 1.1.10
+1382 * @description
+1383 * Here is supported canonicalized cipher algorithm names and its standard names:
+1384 * <ul>
+1385 * <li>RSA - RSA/ECB/PKCS1Padding (default for RSAKey)</li>
+1386 * <li>RSAOAEP - RSA/ECB/OAEPWithSHA-1AndMGF1Padding</li>
+1387 * <li>RSAOAEP224 - RSA/ECB/OAEPWithSHA-224AndMGF1Padding(*)</li>
+1388 * <li>RSAOAEP256 - RSA/ECB/OAEPWithSHA-256AndMGF1Padding</li>
+1389 * <li>RSAOAEP384 - RSA/ECB/OAEPWithSHA-384AndMGF1Padding(*)</li>
+1390 * <li>RSAOAEP512 - RSA/ECB/OAEPWithSHA-512AndMGF1Padding(*)</li>
+1391 * </ul>
+1392 * NOTE: (*) is not supported in Java JCE.<br/>
+1393 * Currently this class supports only RSA encryption and decryption
+1394 * based on RSAES-OAEP and RSAES-PKCS1-v1_5 scheme.
+1395 * However it is planning to implement also symmetric ciphers near in the future */
+1396 /*
+1397 KJUR.crypto.Cipher = function(params) {
+1398 };
+1399 */
+1400 /*
1401 * encrypt raw string by specified key and algorithm<br/>
1402 * @name encrypt
1403 * @memberOf KJUR.crypto.Cipher
@@ -1431,160 +1431,166 @@
1424 * KJUR.crypto.Cipher.encrypt("12abcd...", any, any, { encalg: "des-EDE3-CBC", iv: "1b3c...", key: "3d41..." })
1425 * KJUR.crypto.Cipher.encrypt(any, any, any, { encalg: "des-EDE3-CBC", iv: "1b3c...", key: "3d41...", enc: "12abcd..." })
1426 */
-1427 KJUR.crypto.Cipher.encrypt = function(s, keyObj, algName, param) {
-1428 if (aryval(param, "enclag") != undefined) algName = param.encalg;
-1429
-1430 if (typeof algName == "string" && algName.substr(-4) == "-CBC") {
-1431 var hKey = keyObj;
-1432 var hPlain = s;
-1433 if (aryval(param, "key") != undefined) hKey = param.key;
-1434 if (aryval(param, "enc") != undefined) hEnc = param.enc;
-1435 var wKey = CryptoJS.enc.Hex.parse(hKey);
-1436 var wPlain = CryptoJS.enc.Hex.parse(hPlain);
-1437 var wIV = CryptoJS.enc.Hex.parse(param.iv);
-1438 var wEnc;
-1439 if (algName == "des-EDE3-CBC") {
-1440 wEnc = CryptoJS.TripleDES.encrypt(wPlain, wKey, { iv: wIV });
-1441 } else if (algName == "aes128-CBC" || algName == "aes256-CBC") {
-1442 wEnc = CryptoJS.AES.encrypt(wPlain, wKey, { iv: wIV });
-1443 } else {
-1444 throw new Error("unsupported algorithm: " + algName);
-1445 }
-1446 return wEnc + "";
-1447 } else if (keyObj instanceof RSAKey && keyObj.isPublic) {
-1448 var algName2 = KJUR.crypto.Cipher.getAlgByKeyAndName(keyObj, algName);
-1449 if (algName2 === "RSA") return keyObj.encrypt(s);
-1450 if (algName2 === "RSAOAEP") return keyObj.encryptOAEP(s, "sha1");
-1451
-1452 var a = algName2.match(/^RSAOAEP(\d+)$/);
-1453 if (a !== null) return keyObj.encryptOAEP(s, "sha" + a[1]);
-1454
-1455 throw "Cipher.encrypt: unsupported algorithm for RSAKey: " + algName;
-1456 } else {
-1457 throw "Cipher.encrypt: unsupported key or algorithm";
-1458 }
-1459 };
-1460
-1461 /**
-1462 * decrypt encrypted hexadecimal string with specified key and algorithm<br/>
-1463 * @name decrypt
-1464 * @memberOf KJUR.crypto.Cipher
-1465 * @function
-1466 * @param {string} hex hexadecimal string of encrypted message
-1467 * @param {object} keyObj RSAKey object or hexadecimal string of symmetric cipher key
-1468 * @param {string} algName short/long algorithm name for encryption/decryption (OPTION)
-1469 * @param {object} param parameters for synchronous cipher such as initial vector (OPTION)
-1470 * @return {String} decrypted raw string
-1471 * @since jsrsasign 6.2.0 crypto 1.1.10
-1472 *
-1473 * @description
-1474 * This static method decrypts encrypted hexadecimal string with specified key and algorithm.
-1475 * <br/>
-1476 * NOTE: From jsrsasign 10.9.0, asymmetric cipher ({des-EDE3,aes{128,256}}-CBCis also supported.
-1477 *
-1478 * @example
-1479 * // asynchronous cipher
-1480 * KJUR.crypto.Cipher.decrypt("aaa", prvRSAKeyObj) → "1abc2d..."
-1481 * KJUR.crypto.Cipher.decrypt("aaa", prvRSAKeyObj, "RSAOAEP) → "23ab02..."
-1482 * // synchronous cipher
-1483 * KJUR.crypto.Cipher.decrypt("12abcd...", "5a7d...", "aes256-CBC", { iv: "1b3c..." })
-1484 * KJUR.crypto.Cipher.decrypt("12abcd...", "5a7d...", any, { encalg: "aes128-CBC", iv: "1b3c..." })
-1485 * KJUR.crypto.Cipher.decrypt("12abcd...", any, any, { encalg: "des-EDE3-CBC", iv: "1b3c...", key: "3d41..." })
-1486 * KJUR.crypto.Cipher.decrypt(any, any, any, { encalg: "des-EDE3-CBC", iv: "1b3c...", key: "3d41...", enc: "12abcd..." })
-1487 */
-1488 KJUR.crypto.Cipher.decrypt = function(hex, keyObj, algName, param) {
-1489 if (aryval(param, "enclag") != undefined) algName = param.encalg;
-1490
-1491 if (typeof algName == "string" && algName.substr(-4) == "-CBC") {
-1492 var hKey = keyObj;
-1493 var hEnc = hex;
-1494 if (aryval(param, "key") != undefined) hKey = param.key;
-1495 if (aryval(param, "enc") != undefined) hEnc = param.enc;
-1496 var wKey = CryptoJS.enc.Hex.parse(hKey);
-1497 var wEnc = CryptoJS.enc.Hex.parse(hEnc);
-1498 var wIV = CryptoJS.enc.Hex.parse(param.iv);
-1499 var wDec;
-1500 if (algName == "des-EDE3-CBC") {
-1501 wDec = CryptoJS.TripleDES.decrypt({ ciphertext: wEnc }, wKey, { iv: wIV });
-1502 } else if (algName == "aes128-CBC" || algName == "aes256-CBC") {
-1503 wDec = CryptoJS.AES.decrypt({ ciphertext: wEnc }, wKey, { iv: wIV });
-1504 } else {
-1505 throw new Error("unsupported algorithm: " + algName);
-1506 }
-1507 return CryptoJS.enc.Hex.stringify(wDec);
-1508 } else if (keyObj instanceof RSAKey && keyObj.isPrivate) {
-1509 var algName2 = KJUR.crypto.Cipher.getAlgByKeyAndName(keyObj, algName);
-1510 if (algName2 === "RSA") return keyObj.decrypt(hex);
-1511 if (algName2 === "RSAOAEP") return keyObj.decryptOAEP(hex, "sha1");
-1512
-1513 var a = algName2.match(/^RSAOAEP(\d+)$/);
-1514 if (a !== null) return keyObj.decryptOAEP(hex, "sha" + a[1]);
+1427 /*
+1428 KJUR.crypto.Cipher.encrypt = function(s, keyObj, algName, param) {
+1429 if (aryval(param, "enclag") != undefined) algName = param.encalg;
+1430
+1431 if (typeof algName == "string" && algName.substr(-4) == "-CBC") {
+1432 var hKey = keyObj;
+1433 var hPlain = s;
+1434 if (aryval(param, "key") != undefined) hKey = param.key;
+1435 if (aryval(param, "enc") != undefined) hEnc = param.enc;
+1436 var wKey = CryptoJS.enc.Hex.parse(hKey);
+1437 var wPlain = CryptoJS.enc.Hex.parse(hPlain);
+1438 var wIV = CryptoJS.enc.Hex.parse(param.iv);
+1439 var wEnc;
+1440 if (algName == "des-EDE3-CBC") {
+1441 wEnc = CryptoJS.TripleDES.encrypt(wPlain, wKey, { iv: wIV });
+1442 } else if (algName == "aes128-CBC" || algName == "aes256-CBC") {
+1443 wEnc = CryptoJS.AES.encrypt(wPlain, wKey, { iv: wIV });
+1444 } else {
+1445 throw new Error("unsupported algorithm: " + algName);
+1446 }
+1447 return wEnc + "";
+1448 } else if (keyObj instanceof RSAKey && keyObj.isPublic) {
+1449 var algName2 = KJUR.crypto.Cipher.getAlgByKeyAndName(keyObj, algName);
+1450 if (algName2 === "RSA") return keyObj.encrypt(s);
+1451 if (algName2 === "RSAOAEP") return keyObj.encryptOAEP(s, "sha1");
+1452
+1453 var a = algName2.match(/^RSAOAEP(\d+)$/);
+1454 if (a !== null) return keyObj.encryptOAEP(s, "sha" + a[1]);
+1455
+1456 throw "Cipher.encrypt: unsupported algorithm for RSAKey: " + algName;
+1457 } else {
+1458 throw "Cipher.encrypt: unsupported key or algorithm";
+1459 }
+1460 };
+1461 */
+1462
+1463 /*
+1464 * decrypt encrypted hexadecimal string with specified key and algorithm<br/>
+1465 * @name decrypt
+1466 * @memberOf KJUR.crypto.Cipher
+1467 * @function
+1468 * @param {string} hex hexadecimal string of encrypted message
+1469 * @param {object} keyObj RSAKey object or hexadecimal string of symmetric cipher key
+1470 * @param {string} algName short/long algorithm name for encryption/decryption (OPTION)
+1471 * @param {object} param parameters for synchronous cipher such as initial vector (OPTION)
+1472 * @return {String} decrypted raw string
+1473 * @since jsrsasign 6.2.0 crypto 1.1.10
+1474 *
+1475 * @description
+1476 * This static method decrypts encrypted hexadecimal string with specified key and algorithm.
+1477 * <br/>
+1478 * NOTE: From jsrsasign 10.9.0, asymmetric cipher ({des-EDE3,aes{128,256}}-CBCis also supported.
+1479 *
+1480 * @example
+1481 * // asynchronous cipher
+1482 * KJUR.crypto.Cipher.decrypt("aaa", prvRSAKeyObj) → "1abc2d..."
+1483 * KJUR.crypto.Cipher.decrypt("aaa", prvRSAKeyObj, "RSAOAEP) → "23ab02..."
+1484 * // synchronous cipher
+1485 * KJUR.crypto.Cipher.decrypt("12abcd...", "5a7d...", "aes256-CBC", { iv: "1b3c..." })
+1486 * KJUR.crypto.Cipher.decrypt("12abcd...", "5a7d...", any, { encalg: "aes128-CBC", iv: "1b3c..." })
+1487 * KJUR.crypto.Cipher.decrypt("12abcd...", any, any, { encalg: "des-EDE3-CBC", iv: "1b3c...", key: "3d41..." })
+1488 * KJUR.crypto.Cipher.decrypt(any, any, any, { encalg: "des-EDE3-CBC", iv: "1b3c...", key: "3d41...", enc: "12abcd..." })
+1489 */
+1490 /*
+1491 KJUR.crypto.Cipher.decrypt = function(hex, keyObj, algName, param) {
+1492 if (aryval(param, "enclag") != undefined) algName = param.encalg;
+1493
+1494 if (typeof algName == "string" && algName.substr(-4) == "-CBC") {
+1495 var hKey = keyObj;
+1496 var hEnc = hex;
+1497 if (aryval(param, "key") != undefined) hKey = param.key;
+1498 if (aryval(param, "enc") != undefined) hEnc = param.enc;
+1499 var wKey = CryptoJS.enc.Hex.parse(hKey);
+1500 var wEnc = CryptoJS.enc.Hex.parse(hEnc);
+1501 var wIV = CryptoJS.enc.Hex.parse(param.iv);
+1502 var wDec;
+1503 if (algName == "des-EDE3-CBC") {
+1504 wDec = CryptoJS.TripleDES.decrypt({ ciphertext: wEnc }, wKey, { iv: wIV });
+1505 } else if (algName == "aes128-CBC" || algName == "aes256-CBC") {
+1506 wDec = CryptoJS.AES.decrypt({ ciphertext: wEnc }, wKey, { iv: wIV });
+1507 } else {
+1508 throw new Error("unsupported algorithm: " + algName);
+1509 }
+1510 return CryptoJS.enc.Hex.stringify(wDec);
+1511 } else if (keyObj instanceof RSAKey && keyObj.isPrivate) {
+1512 var algName2 = KJUR.crypto.Cipher.getAlgByKeyAndName(keyObj, algName);
+1513 if (algName2 === "RSA") return keyObj.decrypt(hex);
+1514 if (algName2 === "RSAOAEP") return keyObj.decryptOAEP(hex, "sha1");
1515
-1516 throw "Cipher.decrypt: unsupported algorithm for RSAKey: " + algName;
-1517 } else {
-1518 throw "Cipher.decrypt: unsupported key or algorithm";
-1519 }
-1520 };
-1521
-1522 /**
-1523 * get canonicalized encrypt/decrypt algorithm name by key and short/long algorithm name<br/>
-1524 * @name getAlgByKeyAndName
-1525 * @memberOf KJUR.crypto.Cipher
-1526 * @function
-1527 * @param {Object} keyObj RSAKey object or hexadecimal string of symmetric cipher key
-1528 * @param {String} algName short/long algorithm name for encryption/decryption
-1529 * @return {String} canonicalized algorithm name for encryption/decryption
-1530 * @since jsrsasign 6.2.0 crypto 1.1.10
-1531 * @description
-1532 * Here is supported canonicalized cipher algorithm names and its standard names:
-1533 * <ul>
-1534 * <li>RSA - RSA/ECB/PKCS1Padding (default for RSAKey)</li>
-1535 * <li>RSAOAEP - RSA/ECB/OAEPWithSHA-1AndMGF1Padding</li>
-1536 * <li>RSAOAEP224 - RSA/ECB/OAEPWithSHA-224AndMGF1Padding(*)</li>
-1537 * <li>RSAOAEP256 - RSA/ECB/OAEPWithSHA-256AndMGF1Padding</li>
-1538 * <li>RSAOAEP384 - RSA/ECB/OAEPWithSHA-384AndMGF1Padding(*)</li>
-1539 * <li>RSAOAEP512 - RSA/ECB/OAEPWithSHA-512AndMGF1Padding(*)</li>
-1540 * </ul>
-1541 * NOTE: (*) is not supported in Java JCE.
-1542 * @example
-1543 * KJUR.crypto.Cipher.getAlgByKeyAndName(objRSAKey) → "RSA"
-1544 * KJUR.crypto.Cipher.getAlgByKeyAndName(objRSAKey, "RSAOAEP") → "RSAOAEP"
-1545 */
-1546 KJUR.crypto.Cipher.getAlgByKeyAndName = function(keyObj, algName) {
-1547 if (keyObj instanceof RSAKey) {
-1548 if (":RSA:RSAOAEP:RSAOAEP224:RSAOAEP256:RSAOAEP384:RSAOAEP512:".indexOf(algName) != -1)
-1549 return algName;
-1550 if (algName === null || algName === undefined) return "RSA";
-1551 throw "getAlgByKeyAndName: not supported algorithm name for RSAKey: " + algName;
-1552 }
-1553 throw "getAlgByKeyAndName: not supported algorithm name: " + algName;
-1554 }
-1555
-1556 // ====== Other Utility class =====================================================
-1557
-1558 /**
-1559 * static object for cryptographic function utilities
-1560 * @name KJUR.crypto.OID
-1561 * @class static object for cryptography related OIDs
-1562 * @property {Array} oidhex2name key value of hexadecimal OID and its name
-1563 * (ex. '2a8648ce3d030107' and 'secp256r1')
-1564 * @since crypto 1.1.3
-1565 * @description
-1566 */
-1567 KJUR.crypto.OID = new function() {
-1568 this.oidhex2name = {
-1569 '2a864886f70d010101': 'rsaEncryption',
-1570 '2a8648ce3d0201': 'ecPublicKey',
-1571 '2a8648ce380401': 'dsa',
-1572 '2a8648ce3d030107': 'secp256r1',
-1573 '2b8104001f': 'secp192k1',
-1574 '2b81040021': 'secp224r1',
-1575 '2b8104000a': 'secp256k1',
-1576 '2b81040022': 'secp384r1',
-1577 '2b81040023': 'secp521r1',
-1578 '2a8648ce380403': 'SHA1withDSA', // 1.2.840.10040.4.3
-1579 '608648016503040301': 'SHA224withDSA', // 2.16.840.1.101.3.4.3.1
-1580 '608648016503040302': 'SHA256withDSA', // 2.16.840.1.101.3.4.3.2
-1581 };
-1582 };
-1583