Ejemplo n.º 1
0
 /// <summary>
 /// Create a new instance, with the default encryption key and vector. Since this
 /// is a well known (just look up the source) it is NOT recommended to use this,
 /// as anyone can decrypt our secret keys!
 /// </summary>
 protected OneTimePassword()
 {
     _aesIv = new byte[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 };
     _aesKey = new byte[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
                            17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31 };
     Devices = new Devices(_aesKey, _aesIv);
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Create a new instance with your encryption key and vector. This is the
 /// recommended way of creating a new instance of this class!
 /// </summary>
 /// <param name="aesKey">AES key (max 265bit)</param>
 /// <param name="aesIv">Initialization vector, recommended is 128bit</param>
 protected OneTimePassword(byte[] aesKey, byte[] aesIv)
 {
     _aesIv = aesIv;
     _aesKey = aesKey;
     Devices = new Devices(_aesKey, _aesIv);
 }