コード例 #1
0
 CipherContextRef(NativeCipher nc, long id, boolean encrypt) {
   super(nc, refQueue);
   this.id = id;
   this.encrypt = encrypt;
   refList.add(this);
   UcryptoProvider.debug("Resource: trace CipherCtxt " + this.id);
   drainRefQueueBounded();
 }
コード例 #2
0
 void dispose(boolean doCancel) {
   refList.remove(this);
   try {
     if (doCancel) {
       UcryptoProvider.debug("Resource: cancel CipherCtxt " + id);
       int k = NativeCipher.nativeFinal(id, encrypt, null, 0);
       if (k < 0) {
         UcryptoProvider.debug(
             "Resource: error cancelling CipherCtxt "
                 + id
                 + " "
                 + new UcryptoException(-k).getMessage());
       }
     } else {
       UcryptoProvider.debug("Resource: untrace CipherCtxt " + id);
     }
   } finally {
     this.clear();
   }
 }