public void SetKeys(byte[] key, byte[] clientNonce, byte[] serverNonce) { try { _aesLock.EnterWriteLock(); _aes = new OcbAes(); _aes.Initialise(key); ServerNonce = serverNonce; ClientNonce = clientNonce; } finally { _aesLock.ExitWriteLock(); } }