Advertisement
AyrA

C# signer base.cs

Jun 20th, 2014
315
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 3.04 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Text;
  4.  
  5. namespace Signer
  6. {
  7.     /// <summary>
  8.     /// Contains main informations.
  9.     /// Changing values may cause
  10.     /// seperate netwokrs to be built
  11.     /// or your machine to be lit on fire.
  12.     /// </summary>
  13.     public static class Base
  14.     {
  15.         /// <summary>
  16.         /// Client version string.
  17.         /// Can be changed to whatever you like
  18.         /// </summary>
  19.         public const string VERSION = "Signer/1.0.0.0 C# .NET-2.0";
  20.        
  21.         /// <summary>
  22.         /// Size in bits of the keys for asymetric encryption.
  23.         /// Must be supported by the chosen algorithm
  24.         /// </summary>
  25.         public const int ASYM_KEYSIZE = 1024 * 4;
  26.  
  27.         /// <summary>
  28.         /// allowed chars for a password.
  29.         /// Can be changed
  30.         /// </summary>
  31.         public const string SYM_PWDMAP = "!,.-;:_@#|¦¢abcdefghijklmnopqrstuvwxyzéàèöäüÄÖÜÀÉÈABCDEFGHIJKLMNOPQRSTUVWXYZ[]{}()<>0123456789=/&%ç*\"+\\?'~^`´¨";
  32.  
  33.         /// <summary>
  34.         /// Size of a RSA block for encryption/decryption.
  35.         /// probably breaks everything if changed
  36.         /// </summary>
  37.         public const int ASYM_RSASIZE = 512;
  38.  
  39.         /// <summary>
  40.         /// Size of the IV for Rijndael method.
  41.         /// Must be supported by the encryption algorithm
  42.         /// </summary>
  43.         public const int SYM_IV = 16;
  44.  
  45.         /// <summary>
  46.         /// Size of the Password for Rijndael method.
  47.         /// Must be supported by the encryption algorithm
  48.         /// </summary>
  49.         public const int SYM_PW = 32;
  50.  
  51.         /// <summary>
  52.         /// Hash type for content
  53.         /// </summary>
  54.         public const HashType CRYPT_HASH = HashType.SHA512;
  55.  
  56.         /// <summary>
  57.         /// hash type for addresses
  58.         /// </summary>
  59.         public const HashType ADDR_HASH = HashType.SHA1;
  60.  
  61.         /// <summary>
  62.         /// Default password for pfx file if not specified by the user
  63.         /// can be changed, but the pfx file must be deleted if it exists.
  64.         /// </summary>
  65.         public const string CERT_PWD = "Change!MeS0metim35";
  66.  
  67.         /// <summary>
  68.         /// Issuer for the certificate.
  69.         /// Can be changed to any valid ASN notation for the issuer
  70.         /// </summary>
  71.         public const string CERT_ISSUER = "C=CH, ST=NA, L=NA, O=NA, OU=NA, CN=Signer";
  72.  
  73.         /// <summary>
  74.         /// File for local server certificate
  75.         /// </summary>
  76.         public const string CERT_FILE = "local.pfx";
  77.  
  78.         /// <summary>
  79.         /// Maximum Age (in seconds) of a message
  80.         /// </summary>
  81.         public const int AGE_MSG = 60 * 60 * 24 * 10; //10 days
  82.        
  83.         /// <summary>
  84.         /// Maximum Age (in seconds) of a public key
  85.         /// </summary>
  86.         public const int AGE_PUBKEY = 60 * 60 * 24 * 50;
  87.        
  88.         /// <summary>
  89.         /// Maximum Age (in seconds) of an IP entry
  90.         /// </summary>
  91.         public const int AGE_IP = 60 * 60 * 24 * 1; //1 day
  92.  
  93.     }
  94. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement