jdk/src/share/classes/com/sun/crypto/provider/CipherFeedback.java
changeset 20752 f0f0acea9113
parent 5506 202f599c92aa
--- a/jdk/src/share/classes/com/sun/crypto/provider/CipherFeedback.java	Tue Oct 08 11:07:31 2013 -0700
+++ b/jdk/src/share/classes/com/sun/crypto/provider/CipherFeedback.java	Tue Oct 08 11:17:53 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2007, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -150,9 +150,10 @@
      * @param plainLen the length of the input data
      * @param cipher the buffer for the result
      * @param cipherOffset the offset in <code>cipher</code>
+     * @return the length of the encrypted data
      */
-    void encrypt(byte[] plain, int plainOffset, int plainLen,
-                        byte[] cipher, int cipherOffset)
+    int encrypt(byte[] plain, int plainOffset, int plainLen,
+                byte[] cipher, int cipherOffset)
     {
         int i, len;
         len = blockSize - numBytes;
@@ -194,6 +195,7 @@
                 }
             }
         }
+        return plainLen;
     }
 
     /**
@@ -218,9 +220,10 @@
      * @param cipherLen the length of the input data
      * @param plain the buffer for the result
      * @param plainOffset the offset in <code>plain</code>
+     * @return the length of the decrypted data
      */
-    void decrypt(byte[] cipher, int cipherOffset, int cipherLen,
-                        byte[] plain, int plainOffset)
+    int decrypt(byte[] cipher, int cipherOffset, int cipherLen,
+                byte[] plain, int plainOffset)
     {
         int i, len;
         len = blockSize - numBytes;
@@ -268,5 +271,6 @@
                 }
             }
         }
+        return cipherLen;
     }
 }