Beispiel #1
0
        public void KeysFactory_GenerateNewPair_Should_Generate_NotNull_KeysPair()
        {
            var kf = new KeysFactory();

            var keys = kf.GenerateNewPair();

            Assert.NotNull(keys);
            Assert.NotNull(keys.PrivateKey);
            Assert.NotNull(keys.PublicKey);
            Assert.True(keys.PrivateKey.Length > 0);
            Assert.True(keys.PublicKey.Length > 0);
        }
        /// <summary>
        /// Creates a unique instance of the plugin type, with new
        /// instances of all native-code instances needed to access
        /// the entire hardware API.
        /// </summary>
        public ImplantJSInstance CreateInstance(JavascriptImplant parent)
        {
            var implant = ImplantFactory.Construct(parent);

            implant.osc      = OscFactory.Construct(parent);
            implant.pads     = PadFactory.Construct(parent);
            implant.knobs    = KnobFactory.Construct(parent);
            implant.keys     = KeysFactory.Construct(parent);
            implant.gui      = GuiFactory.Construct(parent);
            implant.time     = TimeFactory.Construct(parent);
            implant.settings = SettingsFactory.Construct(parent);
            implant.shared   = StaticFactory.Construct(parent);
            implant.session  = SessionFactory.Construct(parent);
            implant.mode     = ModesFactory.Construct(parent);

            return(implant);
        }