예제 #1
0
        /// <summary>
        /// Create a group manager with the given values. The group manager namespace
        /// is /{prefix}/read/{dataType} .
        /// </summary>
        ///
        /// <param name="prefix">The prefix for the group manager namespace.</param>
        /// <param name="dataType">The data type for the group manager namespace.</param>
        /// <param name="database"></param>
        /// <param name="keySize">The group key will be an RSA key with keySize bits.</param>
        /// <param name="freshnessHours"></param>
        /// <param name="keyChain"></param>
        public GroupManager(Name prefix, Name dataType, GroupManagerDb database,
                            int keySize, int freshnessHours, KeyChain keyChain)
        {
            namespace_ = new Name(prefix).append(net.named_data.jndn.encrypt.algo.Encryptor.NAME_COMPONENT_READ)
                         .append(dataType);
            database_       = database;
            keySize_        = keySize;
            freshnessHours_ = freshnessHours;

            keyChain_ = keyChain;
        }
예제 #2
0
        /// <summary>
        /// Create a group manager with the given values. The group manager namespace
        /// is /{prefix}/read/{dataType} .
        /// </summary>
        ///
        /// <param name="prefix">The prefix for the group manager namespace.</param>
        /// <param name="dataType">The data type for the group manager namespace.</param>
        /// <param name="database"></param>
        /// <param name="keySize">The group key will be an RSA key with keySize bits.</param>
        /// <param name="freshnessHours"></param>
        /// <param name="keyChain"></param>
        public GroupManager(Name prefix, Name dataType, GroupManagerDb database,
				int keySize, int freshnessHours, KeyChain keyChain)
        {
            namespace_ = new Name(prefix).append(net.named_data.jndn.encrypt.algo.Encryptor.NAME_COMPONENT_READ)
                    .append(dataType);
            database_ = database;
            keySize_ = keySize;
            freshnessHours_ = freshnessHours;

            keyChain_ = keyChain;
        }
예제 #3
0
        public void setUp()
        {
            // Don't show INFO log messages.
            ILOG.J2CsMapping.Util.Logging.Logger.getLogger("").setLevel(ILOG.J2CsMapping.Util.Logging.Level.WARNING);

            FileInfo policyConfigDirectory = net.named_data.jndn.tests.integration_tests.IntegrationTestsCommon
                    .getPolicyConfigDirectory();

            databaseFilePath = new FileInfo(System.IO.Path.Combine(policyConfigDirectory.FullName,"test.db"));
            databaseFilePath.delete();

            database = new Sqlite3GroupManagerDb(System.IO.Path.GetFullPath(databaseFilePath.Name));
        }