This file is indexed.

/usr/include/xsec/dsig/DSIGConstants.hpp is in libxml-security-c-dev 1.7.2-2.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
/**
 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license agreements. See the NOTICE file
 * distributed with this work for additional information
 * regarding copyright ownership. The ASF licenses this file
 * to you under the Apache License, Version 2.0 (the
 * "License"); you may not use this file except in compliance
 * with the License. You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing,
 * software distributed under the License is distributed on an
 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 * KIND, either express or implied. See the License for the
 * specific language governing permissions and limitations
 * under the License.
 */

/*
 * XSEC
 *
 * DSIGConstants := Definitions of varius DSIG constants (mainly strings)
 *
 * Author(s): Berin Lautenbach
 *
 * $Id: DSIGConstants.hpp 1363191 2012-07-19 00:33:46Z scantor $
 *
 */

#ifndef DSIGCONSTANTS_HEADER
#define DSIGCONSTANTS_HEADER

#include <xsec/utils/XSECSafeBuffer.hpp>

// Xerces
#include <xercesc/util/XMLString.hpp>

XSEC_USING_XERCES(XMLString);

// Name Spaces

#define URI_ID_DSIG		"http://www.w3.org/2000/09/xmldsig#"
#define URI_ID_DSIG11	"http://www.w3.org/2009/xmldsig11#"
#define URI_ID_EC		"http://www.w3.org/2001/10/xml-exc-c14n#"
// Also used as algorithm ID for XPATH_FILTER
#define URI_ID_XPF		"http://www.w3.org/2002/06/xmldsig-filter2"
#define URI_ID_XENC		"http://www.w3.org/2001/04/xmlenc#"
#define URI_ID_XENC11	"http://www.w3.org/2009/xmlenc11#"

// Hashing Algorithms

#define URI_ID_SHA1			"http://www.w3.org/2000/09/xmldsig#sha1"
#define URI_ID_MD5			"http://www.w3.org/2001/04/xmldsig-more#md5"
#define URI_ID_SHA224       "http://www.w3.org/2001/04/xmldsig-more#sha224"
#define URI_ID_SHA256       "http://www.w3.org/2001/04/xmlenc#sha256"
#define URI_ID_SHA384       "http://www.w3.org/2001/04/xmldsig-more#sha384"
#define URI_ID_SHA512       "http://www.w3.org/2001/04/xmlenc#sha512"

// Encryption Algorithms
#define URI_ID_3DES_CBC		"http://www.w3.org/2001/04/xmlenc#tripledes-cbc"
#define URI_ID_AES128_CBC	"http://www.w3.org/2001/04/xmlenc#aes128-cbc"
#define URI_ID_AES192_CBC	"http://www.w3.org/2001/04/xmlenc#aes192-cbc"
#define URI_ID_AES256_CBC	"http://www.w3.org/2001/04/xmlenc#aes256-cbc"
#define URI_ID_AES128_GCM	"http://www.w3.org/2009/xmlenc11#aes128-gcm"
#define URI_ID_AES192_GCM	"http://www.w3.org/2009/xmlenc11#aes192-gcm"
#define URI_ID_AES256_GCM	"http://www.w3.org/2009/xmlenc11#aes256-gcm"


// Key Wrap Algorithm
#define URI_ID_KW_3DES		    "http://www.w3.org/2001/04/xmlenc#kw-tripledes"
#define URI_ID_KW_AES128	    "http://www.w3.org/2001/04/xmlenc#kw-aes128"
#define URI_ID_KW_AES192	    "http://www.w3.org/2001/04/xmlenc#kw-aes192"
#define URI_ID_KW_AES256	    "http://www.w3.org/2001/04/xmlenc#kw-aes256"
#define URI_ID_KW_AES128_PAD	"http://www.w3.org/2009/xmlenc11#kw-aes-128-pad"
#define URI_ID_KW_AES192_PAD	"http://www.w3.org/2009/xmlenc11#kw-aes-192-pad"
#define URI_ID_KW_AES256_PAD	"http://www.w3.org/2009/xmlenc11#kw-aes-256-pad"

// Key Transport algorithms
#define URI_ID_RSA_1_5			"http://www.w3.org/2001/04/xmlenc#rsa-1_5"
#define URI_ID_RSA_OAEP_MGFP1	"http://www.w3.org/2001/04/xmlenc#rsa-oaep-mgf1p"
#define URI_ID_RSA_OAEP	        "http://www.w3.org/2009/xmlenc11#rsa-oaep"

// OAEP MGFs
#define URI_ID_MGF1_BASE	    "http://www.w3.org/2009/xmlenc11#mgf1"
#define URI_ID_MGF1_SHA1        "http://www.w3.org/2009/xmlenc11#mgf1sha1"
#define URI_ID_MGF1_SHA224      "http://www.w3.org/2009/xmlenc11#mgf1sha224"
#define URI_ID_MGF1_SHA256      "http://www.w3.org/2009/xmlenc11#mgf1sha256"
#define URI_ID_MGF1_SHA384      "http://www.w3.org/2009/xmlenc11#mgf1sha384"
#define URI_ID_MGF1_SHA512      "http://www.w3.org/2009/xmlenc11#mgf1sha512"

// Transforms

#define URI_ID_BASE64			"http://www.w3.org/2000/09/xmldsig#base64"
#define URI_ID_XPATH			"http://www.w3.org/TR/1999/REC-xpath-19991116"
#define URI_ID_XSLT				"http://www.w3.org/TR/1999/REC-xslt-19991116"
#define URI_ID_ENVELOPE			"http://www.w3.org/2000/09/xmldsig#enveloped-signature"
#define URI_ID_C14N_NOC			"http://www.w3.org/TR/2001/REC-xml-c14n-20010315"
#define URI_ID_C14N_COM			"http://www.w3.org/TR/2001/REC-xml-c14n-20010315#WithComments"
#define URI_ID_C14N11_NOC       "http://www.w3.org/2006/12/xml-c14n11"
#define URI_ID_C14N11_COM       "http://www.w3.org/2006/12/xml-c14n11#WithComments"
#define URI_ID_EXC_C14N_NOC		"http://www.w3.org/2001/10/xml-exc-c14n#"
#define URI_ID_EXC_C14N_COM		"http://www.w3.org/2001/10/xml-exc-c14n#WithComments"
#define XPATH_EXPR_ENVELOPE		"count(ancestor-or-self::dsig:Signature | \
								 here()/ancestor::dsig:Signature[1]) > \
								 count(ancestor-or-self::dsig:Signature)"

// Signature Algorithms

#define URI_ID_SIG_BASE		"http://www.w3.org/2000/09/xmldsig#"
#define URI_ID_SIG_BASEMORE	"http://www.w3.org/2001/04/xmldsig-more#"
#define URI_ID_SIG_BASE11	"http://www.w3.org/2009/xmldsig11#"
#define URI_ID_SIG_DSA		"dsa"
#define URI_ID_SIG_ECDSA	"ecdsa"
#define URI_ID_SIG_HMAC		"hmac"
#define URI_ID_SIG_SHA1		"sha1"
#define URI_ID_SIG_SHA224	"sha224"
#define URI_ID_SIG_SHA256	"sha256"
#define URI_ID_SIG_SHA384	"sha384"
#define URI_ID_SIG_SHA512	"sha512"
#define URI_ID_SIG_RSA		"rsa"
#define URI_ID_SIG_MD5		"md5"

#define URI_ID_DSA_SHA1		"http://www.w3.org/2000/09/xmldsig#dsa-sha1"
#define URI_ID_DSA_SHA256	"http://www.w3.org/2009/xmldsig11#dsa-sha256"
#define URI_ID_HMAC_SHA1	"http://www.w3.org/2000/09/xmldsig#hmac-sha1"
#define URI_ID_HMAC_SHA224	"http://www.w3.org/2001/04/xmldsig-more#hmac-sha224"
#define URI_ID_HMAC_SHA256	"http://www.w3.org/2001/04/xmldsig-more#hmac-sha256"
#define URI_ID_HMAC_SHA384	"http://www.w3.org/2001/04/xmldsig-more#hmac-sha384"
#define URI_ID_HMAC_SHA512	"http://www.w3.org/2001/04/xmldsig-more#hmac-sha512"
#define URI_ID_RSA_SHA1		"http://www.w3.org/2000/09/xmldsig#rsa-sha1"
#define URI_ID_RSA_SHA224	"http://www.w3.org/2001/04/xmldsig-more#rsa-sha224"
#define URI_ID_RSA_SHA256	"http://www.w3.org/2001/04/xmldsig-more#rsa-sha256"
#define URI_ID_RSA_SHA384	"http://www.w3.org/2001/04/xmldsig-more#rsa-sha384"
#define URI_ID_RSA_SHA512	"http://www.w3.org/2001/04/xmldsig-more#rsa-sha512"
#define URI_ID_RSA_MD5		"http://www.w3.org/2001/04/xmldsig-more#rsa-md5"
#define URI_ID_ECDSA_SHA1	"http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha1"
#define URI_ID_ECDSA_SHA224	"http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha224"
#define URI_ID_ECDSA_SHA256	"http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha256"
#define URI_ID_ECDSA_SHA384	"http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha384"
#define URI_ID_ECDSA_SHA512	"http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha512"

// Encryption defines
#define URI_ID_XENC_ELEMENT	"http://www.w3.org/2001/04/xmlenc#Element"
#define URI_ID_XENC_CONTENT	"http://www.w3.org/2001/04/xmlenc#Content"

// General

#define URI_ID_XMLNS	"http://www.w3.org/2000/xmlns/"
#define URI_ID_MANIFEST "http://www.w3.org/2000/09/xmldsig#Manifest"
#define URI_ID_RAWX509  "http://www.w3.org/2000/09/xmldsig#rawX509Certificate"

// Internal Crypto Providers

#define PROV_OPENSSL	"OpenSSL Provider"
#define PROV_WINCAPI	"WinCAPI Provider"
#define PROV_NSS	    "NSS Provider"

// Enumerated Types

enum canonicalizationMethod {

	CANON_NONE					= 0,			// No method defined
	CANON_C14N_NOC				= 1,			// C14n without comments
	CANON_C14N_COM				= 2, 			// C14n with comments
	CANON_C14NE_NOC				= 3,			// C14n Exclusive (without comments)
	CANON_C14NE_COM				= 4,			// C14n Exlusive (with Comments
	CANON_C14N11_NOC            = 5,            // C14n 1.1 without comments
	CANON_C14N11_COM            = 6             // C14n 1.1 with comments
};

enum signatureMethod {

	SIGNATURE_NONE				= 0,			// No method defined
	SIGNATURE_DSA				= 1, 			// DSA
	SIGNATURE_HMAC				= 2,			// Hash MAC
	SIGNATURE_RSA				= 3,			// RSA
	SIGNATURE_ECDSA				= 4				// ECDSA
};


enum hashMethod {

	HASH_NONE					= 0,			// No method defined
	HASH_SHA1					= 1, 			// SHA1
	HASH_MD5					= 2,
	HASH_SHA224					= 3,
	HASH_SHA256					= 4,
	HASH_SHA384					= 5,
	HASH_SHA512					= 6
};

enum transformType {

	TRANSFORM_BASE64,
	TRANSFORM_C14N,
    TRANSFORM_C14N11,
	TRANSFORM_EXC_C14N,
	TRANSFORM_ENVELOPED_SIGNATURE,
	TRANSFORM_XPATH,
	TRANSFORM_XSLT,
	TRANSFORM_XPATH_FILTER
};

enum xpathFilterType {

	FILTER_UNION			= 0,	/** Results should be added to previous nodeset */
	FILTER_INTERSECT		= 1,	/** Results should be included if in prev nodeset */
	FILTER_SUBTRACT			= 2		/** Results should be subtracted from prev nodeset */

};

enum encryptionMethod {

	ENCRYPT_NONE			= 0,				// No method defined
	ENCRYPT_3DES_CBC		= 1,				// Use 3DES
	ENCRYPT_AES128_CBC		= 2,				// 128 bit AES in CBC mode
	ENCRYPT_AES192_CBC		= 3,				// 192 bit AES in CBC mode
	ENCRYPT_AES256_CBC		= 4,				// 256 bit AES in CBC mode
	ENCRYPT_KW_AES128		= 5,				// KeyWrap - AES128
	ENCRYPT_KW_AES192		= 6,				// KeyWrap - AES192
	ENCRYPT_KW_AES256		= 7,				// KeyWrap - AES256
	ENCRYPT_KW_3DES			= 8,
	ENCRYPT_RSA_15			= 9,				// RSA with PKCS 1.5 padding
	ENCRYPT_RSA_OAEP_MGFP1	= 10,				// RSA with OAEP and MGFP1
    ENCRYPT_RSA_OAEP	    = 11,				// RSA with OAEP
	ENCRYPT_AES128_GCM		= 12,				// 128 bit AES in GCM
    ENCRYPT_AES192_GCM		= 13,				// 192 bit AES in GCM
	ENCRYPT_AES256_GCM		= 14,				// 256 bit AES in GCM
	ENCRYPT_KW_AES128_PAD	= 15,				// KeyWrap - AES128 with padding
	ENCRYPT_KW_AES192_PAD	= 16,				// KeyWrap - AES192 with padding
	ENCRYPT_KW_AES256_PAD	= 17				// KeyWrap - AES256 with padding
};

enum maskGenerationFunc {
    MGF_NONE                = 0,                // No MGF defined
    MGF1_SHA1               = 1,                // MGF1-SHA1
    MGF1_SHA224             = 2,                // MGF1-SHA224
    MGF1_SHA256             = 3,                // MGF1-SHA256
    MGF1_SHA384             = 4,                // MGF1-SHA384
    MGF1_SHA512             = 5                 // MGF1-SHA512
};

// --------------------------------------------------------------------------------
//           Some utility functions
// --------------------------------------------------------------------------------

inline
bool canonicalizationMethod2URI(safeBuffer &uri, canonicalizationMethod cm) {

	switch (cm) {

	case (CANON_C14N_NOC) :

		uri = URI_ID_C14N_NOC;
		break;

	case (CANON_C14N_COM) :

		uri = URI_ID_C14N_COM;
		break;

	case (CANON_C14NE_NOC) :

		uri = URI_ID_EXC_C14N_NOC;
		break;

	case (CANON_C14NE_COM) :

		uri = URI_ID_EXC_C14N_COM;
		break;

    case (CANON_C14N11_NOC) :

        uri = URI_ID_C14N11_NOC;
        break;

    case (CANON_C14N11_COM) :

        uri = URI_ID_C14N11_COM;
        break;

	default :
		return false;		// Unknown type

	}

	return true;

}

inline
bool signatureHashMethod2URI(safeBuffer &uri, signatureMethod sm, hashMethod hm) {

	if (hm < HASH_MD5 && sm != SIGNATURE_ECDSA)
		uri = URI_ID_SIG_BASE;
    else if (hm == HASH_SHA256 && sm == SIGNATURE_DSA)
        uri = URI_ID_SIG_BASE11;
	else
		uri = URI_ID_SIG_BASEMORE;

	switch (sm) {

	case (SIGNATURE_DSA) :

		uri.sbStrcatIn(URI_ID_SIG_DSA);
		break;

	case (SIGNATURE_HMAC) :

		uri.sbStrcatIn(URI_ID_SIG_HMAC);
		break;

	case (SIGNATURE_RSA) :

		uri.sbStrcatIn(URI_ID_SIG_RSA);
		break;

	case (SIGNATURE_ECDSA) :

		uri.sbStrcatIn(URI_ID_SIG_ECDSA);
		break;

	default :

		return false;

	}

	uri.sbStrcatIn("-");

	switch (hm) {

	case (HASH_SHA1) :

		uri.sbStrcatIn(URI_ID_SIG_SHA1);
		break;

	case (HASH_MD5) :

		uri.sbStrcatIn(URI_ID_SIG_MD5);
		break;

	case (HASH_SHA224) :

		uri.sbStrcatIn(URI_ID_SIG_SHA224);
		break;

	case (HASH_SHA256) :

		uri.sbStrcatIn(URI_ID_SIG_SHA256);
		break;

	case (HASH_SHA384) :

		uri.sbStrcatIn(URI_ID_SIG_SHA384);
		break;

	case (HASH_SHA512) :

		uri.sbStrcatIn(URI_ID_SIG_SHA512);
		break;

	default:

		return false;

	}

	return true;

}

inline
bool hashMethod2URI(safeBuffer &uri, hashMethod hm) {

	switch (hm) {

	case (HASH_SHA1) :

		uri = URI_ID_SHA1;
		break;

	case (HASH_MD5) :

		uri = URI_ID_MD5;
		break;

	case (HASH_SHA224) :

		uri = URI_ID_SHA224;
		break;

	case (HASH_SHA256) :

		uri = URI_ID_SHA256;
		break;

	case (HASH_SHA384) :

		uri = URI_ID_SHA384;
		break;

	case (HASH_SHA512) :

		uri = URI_ID_SHA512;
		break;

	default:
		return false;

	}

	return true;

}

inline
bool encryptionMethod2URI(safeBuffer &uri, encryptionMethod em) {

	switch (em) {

	case (ENCRYPT_3DES_CBC) :

		uri = URI_ID_3DES_CBC;
		break;

	case (ENCRYPT_AES128_CBC) :

		uri = URI_ID_AES128_CBC;
		break;

	case (ENCRYPT_AES192_CBC) :

		uri = URI_ID_AES192_CBC;
		break;

	case (ENCRYPT_AES256_CBC) :

		uri = URI_ID_AES256_CBC;
		break;

	case (ENCRYPT_KW_AES128) :

		uri = URI_ID_KW_AES128;
		break;

	case (ENCRYPT_KW_AES192) :

		uri = URI_ID_KW_AES192;
		break;

	case (ENCRYPT_KW_AES256) :

		uri = URI_ID_KW_AES256;
		break;

	case (ENCRYPT_KW_3DES) :

		uri = URI_ID_KW_3DES;
		break;

	case (ENCRYPT_RSA_15) :

		uri = URI_ID_RSA_1_5;
		break;

	case (ENCRYPT_RSA_OAEP_MGFP1) :

		uri = URI_ID_RSA_OAEP_MGFP1;
		break;

	case (ENCRYPT_RSA_OAEP) :

		uri = URI_ID_RSA_OAEP;
		break;

	case (ENCRYPT_AES128_GCM) :

		uri = URI_ID_AES128_GCM;
		break;

	case (ENCRYPT_AES192_GCM) :

		uri = URI_ID_AES192_GCM;
		break;

    case (ENCRYPT_AES256_GCM) :

		uri = URI_ID_AES256_GCM;
		break;

	case (ENCRYPT_KW_AES128_PAD) :

		uri = URI_ID_KW_AES128_PAD;
		break;

	case (ENCRYPT_KW_AES192_PAD) :

		uri = URI_ID_KW_AES192_PAD;
		break;

	case (ENCRYPT_KW_AES256_PAD) :

		uri = URI_ID_KW_AES256_PAD;
		break;

    default:

		return false;

	}

	return true;

}

inline
bool maskGenerationFunc2URI(safeBuffer &uri, maskGenerationFunc mgf) {

	switch (mgf) {

	case (MGF1_SHA1) :

		uri = URI_ID_MGF1_SHA1;
		break;

	case (MGF1_SHA224) :

		uri = URI_ID_MGF1_SHA224;
		break;

	case (MGF1_SHA256) :

		uri = URI_ID_MGF1_SHA256;
		break;

	case (MGF1_SHA384) :

		uri = URI_ID_MGF1_SHA384;
		break;

	case (MGF1_SHA512) :

		uri = URI_ID_MGF1_SHA512;
		break;

	default:
		return false;

	}

	return true;

}


// --------------------------------------------------------------------------------
//           Constant Strings Class
// --------------------------------------------------------------------------------

class DSIG_EXPORT DSIGConstants {

public:

	// General strings

	static const XMLCh * s_unicodeStrEmpty;		// ""
	static const XMLCh * s_unicodeStrNL;		// "\n"
	static const XMLCh * s_unicodeStrXmlns;		// "xmlns"
	static const XMLCh * s_unicodeStrURI;		// "URI"

	// DSIG Element Strings
	static const XMLCh * s_unicodeStrAlgorithm;

	// URI_IDs
	static const XMLCh * s_unicodeStrURIDSIG;
    static const XMLCh * s_unicodeStrURIDSIG11;
	static const XMLCh * s_unicodeStrURIEC;
	static const XMLCh * s_unicodeStrURIXPF;
	static const XMLCh * s_unicodeStrURIXENC;
    static const XMLCh * s_unicodeStrURIXENC11;

	static const XMLCh * s_unicodeStrURISIGBASE;
	static const XMLCh * s_unicodeStrURISIGBASEMORE;
    static const XMLCh * s_unicodeStrURISIGBASE11;

	static const XMLCh * s_unicodeStrURIRawX509;
	static const XMLCh * s_unicodeStrURISHA1;
	static const XMLCh * s_unicodeStrURISHA224;
	static const XMLCh * s_unicodeStrURISHA256;
	static const XMLCh * s_unicodeStrURISHA384;
	static const XMLCh * s_unicodeStrURISHA512;
	static const XMLCh * s_unicodeStrURIMD5;		// Not recommended
	static const XMLCh * s_unicodeStrURIBASE64;
	static const XMLCh * s_unicodeStrURIXPATH;
	static const XMLCh * s_unicodeStrURIXSLT;
	static const XMLCh * s_unicodeStrURIENVELOPE;
	static const XMLCh * s_unicodeStrURIC14N_NOC;
	static const XMLCh * s_unicodeStrURIC14N_COM;
    static const XMLCh * s_unicodeStrURIC14N11_NOC;
    static const XMLCh * s_unicodeStrURIC14N11_COM;
	static const XMLCh * s_unicodeStrURIEXC_C14N_NOC;
	static const XMLCh * s_unicodeStrURIEXC_C14N_COM;

	static const XMLCh * s_unicodeStrURIDSA_SHA1;
    static const XMLCh * s_unicodeStrURIDSA_SHA256;

	static const XMLCh * s_unicodeStrURIRSA_MD5;
	static const XMLCh * s_unicodeStrURIRSA_SHA1;
	static const XMLCh * s_unicodeStrURIRSA_SHA224;
	static const XMLCh * s_unicodeStrURIRSA_SHA256;
	static const XMLCh * s_unicodeStrURIRSA_SHA384;
	static const XMLCh * s_unicodeStrURIRSA_SHA512;

	static const XMLCh * s_unicodeStrURIECDSA_SHA1;
    static const XMLCh * s_unicodeStrURIECDSA_SHA224;
	static const XMLCh * s_unicodeStrURIECDSA_SHA256;
	static const XMLCh * s_unicodeStrURIECDSA_SHA384;
	static const XMLCh * s_unicodeStrURIECDSA_SHA512;

	static const XMLCh * s_unicodeStrURIHMAC_SHA1;
	static const XMLCh * s_unicodeStrURIHMAC_SHA224;
	static const XMLCh * s_unicodeStrURIHMAC_SHA256;
	static const XMLCh * s_unicodeStrURIHMAC_SHA384;
	static const XMLCh * s_unicodeStrURIHMAC_SHA512;

	static const XMLCh * s_unicodeStrURIXMLNS;
	static const XMLCh * s_unicodeStrURIMANIFEST;

	// URIs for Encryption
	static const XMLCh * s_unicodeStrURI3DES_CBC;
	static const XMLCh * s_unicodeStrURIAES128_CBC;
	static const XMLCh * s_unicodeStrURIAES192_CBC;
	static const XMLCh * s_unicodeStrURIAES256_CBC;
	static const XMLCh * s_unicodeStrURIAES128_GCM;
    static const XMLCh * s_unicodeStrURIAES192_GCM;
	static const XMLCh * s_unicodeStrURIAES256_GCM;
	static const XMLCh * s_unicodeStrURIKW_3DES;
	static const XMLCh * s_unicodeStrURIKW_AES128;
	static const XMLCh * s_unicodeStrURIKW_AES192;
	static const XMLCh * s_unicodeStrURIKW_AES256;
	static const XMLCh * s_unicodeStrURIKW_AES128_PAD;
	static const XMLCh * s_unicodeStrURIKW_AES192_PAD;
	static const XMLCh * s_unicodeStrURIKW_AES256_PAD;
	static const XMLCh * s_unicodeStrURIRSA_1_5;
	static const XMLCh * s_unicodeStrURIRSA_OAEP_MGFP1;
    static const XMLCh * s_unicodeStrURIRSA_OAEP;

    static const XMLCh * s_unicodeStrURIMGF1_BASE;
	static const XMLCh * s_unicodeStrURIMGF1_SHA1;
	static const XMLCh * s_unicodeStrURIMGF1_SHA224;
	static const XMLCh * s_unicodeStrURIMGF1_SHA256;
	static const XMLCh * s_unicodeStrURIMGF1_SHA384;
	static const XMLCh * s_unicodeStrURIMGF1_SHA512;
   
	static const XMLCh * s_unicodeStrURIXENC_ELEMENT;
	static const XMLCh * s_unicodeStrURIXENC_CONTENT;

	// Internal Crypto Providers
	static const XMLCh * s_unicodeStrPROVOpenSSL;
	static const XMLCh * s_unicodeStrPROVWinCAPI;
    static const XMLCh * s_unicodeStrPROVNSS;


	DSIGConstants();

	static void create();
	static void destroy();

};




inline
const XMLCh * canonicalizationMethod2UNICODEURI(canonicalizationMethod cm) {

	switch (cm) {

	case (CANON_C14N_NOC) :

		return DSIGConstants::s_unicodeStrURIC14N_NOC;

	case (CANON_C14N_COM) :

		return DSIGConstants::s_unicodeStrURIC14N_COM;

	case (CANON_C14NE_NOC) :

		return DSIGConstants::s_unicodeStrURIEXC_C14N_NOC;

	case (CANON_C14NE_COM) :

		return DSIGConstants::s_unicodeStrURIEXC_C14N_COM;

	default :
		break;

	}

	return DSIGConstants::s_unicodeStrEmpty;

}

// --------------------------------------------------------------------------------
//			URI Inverse Mappings
// --------------------------------------------------------------------------------

/* Map URIs to internal enums, if the URIs are known to the library.
   If they aren't, all these calls will set the Method variables to
   *_NONE, signifying we don't know them.  Note this is not necessarily
   an error - the calling application may have installed handlers to handle
   these URIs, it's just we don't have an internal enum mapping
*/

bool DSIG_EXPORT XSECmapURIToSignatureMethods(const XMLCh * URI,
												  signatureMethod & sm,
												  hashMethod & hm);
bool DSIG_EXPORT XSECmapURIToHashMethod(const XMLCh * URI,
												  hashMethod & hm);
bool DSIG_EXPORT XSECmapURIToCanonicalizationMethod(const XMLCh * URI,
							canonicalizationMethod & cm);

bool DSIG_EXPORT XSECmapURIToMaskGenerationFunc(const XMLCh * URI,
												  maskGenerationFunc & mgf);

#endif /* DSIGCONSTANTS_HEADER */