public virtual void Dispose() { if (_fpeProcessor != null) { _fpeProcessor.ShutDown(); } if (_ffsCache != null) { _ffsCache.Dispose(); _ffsCache = null; } if (_fpeCache != null) { _fpeCache.Dispose(); _fpeCache = null; } if (_fpeTransactions != null) { _fpeTransactions.Dispose(); _fpeTransactions = null; } if (_ubiqWebServices != null) { _ubiqWebServices.Dispose(); _ubiqWebServices = null; } }
public void Dispose() { if (_ubiqWebServices != null) { // reports decryption key usage to server, if applicable ResetAsync().Wait(); _ubiqWebServices.Dispose(); _ubiqWebServices = null; } }
private const int _ff1_base2_min_length = 20; // NIST requirement ceil(log(2(1000000))) #endregion #region Constructors public UbiqFPEEncryptDecrypt(IUbiqCredentials ubiqCredentials) { _isInited = false; _ubiqCredentials = ubiqCredentials; _ubiqWebServices = new UbiqWebServices(_ubiqCredentials); _ffsCache = new FfsCacheManager(_ubiqCredentials, _ubiqWebServices); _fpeCache = new FpeEncryptedKeyCacheManager(_ubiqCredentials, _ubiqWebServices); _fpeTransactions = new FpeTransactionManager(new UbiqWebServices(_ubiqCredentials)); _fpeProcessor = new FpeProcessor(_fpeTransactions, 1); _fpeProcessor.StartUp(); }
public virtual void Dispose() { if (_ubiqWebServices != null) { if (_encryptionKey != null) { // if key was used less times than requested, notify the server. if (_useCount < _usesRequested) { _ubiqWebServices.UpdateEncryptionKeyUsageAsync(_useCount, _usesRequested, _encryptionKey.KeyFingerprint, _encryptionKey.EncryptionSession).Wait(); } } _ubiqWebServices.Dispose(); _ubiqWebServices = null; } }
public UbiqDecrypt(IUbiqCredentials ubiqCredentials) { _ubiqWebServices = new UbiqWebServices(ubiqCredentials); }
public UbiqEncrypt(IUbiqCredentials ubiqCredentials, int usesRequested) { _ubiqCredentials = ubiqCredentials; _usesRequested = usesRequested; _ubiqWebServices = new UbiqWebServices(_ubiqCredentials); }