public Key(byte[] key) { BaseKDF kdf; switch ((KeySize)key.Length) { case KeySize.KNull: kdf = new NullKDF(); break; case KeySize.K256: kdf = new KDF256(key); break; default: throw new ArgumentException("Invalid key length", nameof(key)); } Data = new KeyData(kdf); }
public Encoder(Key key, int rounds = 16) { this.key = key.Data; this.rounds = rounds; }
public Decoder(Key key) { this.key = key.Data; }