00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028 #ifndef XSECCRYPTOUTILS_INCLUDE
00029 #define XSECCRYPTOUTILS_INCLUDE
00030
00031 #include <xsec/framework/XSECDefs.hpp>
00032 #include <xsec/utils/XSECSafeBuffer.hpp>
00033 #include <xsec/dsig/DSIGConstants.hpp>
00034
00040
00041
00042
00043
00044 #define XKMSAuthenticationValue 0x01
00045 #define XKMSRevocationCodeIdenfitierEncoding1 0x02
00046 #define XKMSRevocationCodeIdenfitierEncoding2 0x03
00047 #define XKMSKeyEncryption 0x04
00048
00049 int DSIG_EXPORT CalculateXKMSAuthenticationKey(unsigned char * input, int inputLen, unsigned char * output, int maxOutputLen);
00050 int DSIG_EXPORT CalculateXKMSRevocationCodeIdentifierEncoding1(unsigned char * input, int inputLen, unsigned char * output, int maxOutputLen);
00051
00052 int DSIG_EXPORT CalculateXKMSRevocationCodeIdentifierEncoding2(unsigned char * input, int inputLen, unsigned char * output, int maxOutputLen);
00053
00054 int DSIG_EXPORT CalculateXKMSRevocationCodeIdentifierEncoding2From1(unsigned char * input, int inputLen, unsigned char * output, int maxOutputLen);
00055 int DSIG_EXPORT CalculateXKMSKEK(unsigned char * input, int inputLen, unsigned char * output, int maxOutputLen);
00056
00057
00058
00059
00060
00061 XMLCh DSIG_EXPORT * EncodeToBase64XMLCh(unsigned char * input, int inputLen);
00062 unsigned int DSIG_EXPORT DecodeFromBase64XMLCh(const XMLCh * input, unsigned char * output, int maxOutputLen);
00063 unsigned int DSIG_EXPORT DecodeFromBase64(const char * input, unsigned char * output, int maxOutputLen);
00064
00065
00066
00067
00068
00069
00070
00071
00072 bool DSIG_EXPORT ASN2DSASig(const unsigned char * input, unsigned char * r, unsigned char * s);
00073
00074
00075
00076
00077
00078 unsigned char * getRSASigOID(hashMethod hm, int &oidLen);
00079
00080 #endif
00081
00082