1- /// <reference path='../../../third_party/uTransformers/utransformers.d.ts' />
21/// <reference path='../../../third_party/aes-js/aes-js.d.ts' />
32
43import arraybuffers = require( '../arraybuffers/arraybuffers' ) ;
@@ -7,6 +6,7 @@ import encryption = require('./encryptionShaper');
76import fragmentation = require( './fragmentationShaper' ) ;
87import logging = require( '../logging/logging' ) ;
98import sequence = require( './byteSequenceShaper' ) ;
9+ import transformer = require( './transformer' ) ;
1010
1111const log :logging . Log = new logging . Log ( 'protean' ) ;
1212
@@ -40,7 +40,7 @@ function flatMap<T,E>(input :Array<T>, mappedFunction :(element :T) => Array<E>)
4040// - AES encryption
4141// - decompression using arithmetic coding
4242// - byte sequence injection
43- export class Protean implements Transformer {
43+ export class Protean implements transformer . Transformer {
4444 // Fragmentation transformer
4545 private fragmenter_ :fragmentation . FragmentationShaper ;
4646
@@ -57,12 +57,6 @@ export class Protean implements Transformer {
5757 this . configure ( JSON . stringify ( sampleConfig ( ) ) ) ;
5858 }
5959
60- // This method is required to implement the Transformer API.
61- // @param {ArrayBuffer } key Key to set, not used by this class.
62- public setKey = ( key :ArrayBuffer ) :void => {
63- throw new Error ( 'setKey unimplemented' ) ;
64- }
65-
6660 public configure = ( json :string ) :void => {
6761 let config = JSON . parse ( json ) ;
6862
@@ -119,7 +113,4 @@ export class Protean implements Transformer {
119113 let defragmented = flatMap ( decrypted , this . fragmenter_ . restore ) ;
120114 return defragmented ;
121115 }
122-
123- // No-op (we have no state or any resources to dispose).
124- public dispose = ( ) :void => { }
125116}
0 commit comments