You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by se...@apache.org on 2022/06/30 17:39:52 UTC
[commons-crypto] branch master updated: Standardise order of qualifers
This is an automated email from the ASF dual-hosted git repository.
sebb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-crypto.git
The following commit(s) were added to refs/heads/master by this push:
new bc5af9c Standardise order of qualifers
bc5af9c is described below
commit bc5af9cbc97ecbfc2d4535feb55cf5b404b20842
Author: Sebb <se...@apache.org>
AuthorDate: Thu Jun 30 18:39:44 2022 +0100
Standardise order of qualifers
[skip ci]
---
.../apache/commons/crypto/cipher/OpenSslNative.java | 20 ++++++++++----------
.../crypto/random/OpenSslCryptoRandomNative.java | 4 ++--
2 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/src/main/java/org/apache/commons/crypto/cipher/OpenSslNative.java b/src/main/java/org/apache/commons/crypto/cipher/OpenSslNative.java
index cb61362..64ea231 100644
--- a/src/main/java/org/apache/commons/crypto/cipher/OpenSslNative.java
+++ b/src/main/java/org/apache/commons/crypto/cipher/OpenSslNative.java
@@ -34,7 +34,7 @@ class OpenSslNative {
/**
* Declares a native method to initialize JNI field and method IDs.
*/
- public native static void initIDs();
+ public static native void initIDs();
/**
* Declares a native method to initialize the cipher context.
@@ -43,7 +43,7 @@ class OpenSslNative {
* @param padding The padding name of cipher
* @return the context address of cipher
*/
- public native static long initContext(int algorithm, int padding);
+ public static native long initContext(int algorithm, int padding);
/**
* Declares a native method to initialize the cipher context.
@@ -56,7 +56,7 @@ class OpenSslNative {
* @param iv crypto iv
* @return the context address of cipher
*/
- public native static long init(long context, int mode, int alg,
+ public static native long init(long context, int mode, int alg,
int padding, byte[] key, byte[] iv);
/**
@@ -72,7 +72,7 @@ class OpenSslNative {
* @param maxOutputLength The maximum length for output
* @return The number of bytes stored in output
*/
- public native static int update(long context, ByteBuffer input,
+ public static native int update(long context, ByteBuffer input,
int inputOffset, int inputLength, ByteBuffer output,
int outputOffset, int maxOutputLength);
@@ -89,7 +89,7 @@ class OpenSslNative {
* @param maxOutputLength The maximum length for output
* @return The number of bytes stored in output
*/
- public native static int updateByteArray(long context, byte[] input,
+ public static native int updateByteArray(long context, byte[] input,
int inputOffset, int inputLength, byte[] output, int outputOffset,
int maxOutputLength);
@@ -106,7 +106,7 @@ class OpenSslNative {
* @param maxOutputLength The maximum length for output
* @return The number of bytes stored in output
*/
- public native static int updateByteArrayByteBuffer(long context, byte[] input,
+ public static native int updateByteArrayByteBuffer(long context, byte[] input,
int inputOffset, int inputLength,
ByteBuffer output, int outputOffset, int maxOutputLength);
@@ -120,7 +120,7 @@ class OpenSslNative {
* @param maxOutputLength The maximum length for output
* @return The number of bytes stored in output
*/
- public native static int doFinal(long context, ByteBuffer output,
+ public static native int doFinal(long context, ByteBuffer output,
int offset, int maxOutputLength);
/**
@@ -133,7 +133,7 @@ class OpenSslNative {
* @param maxOutputLength The maximum length for output
* @return The number of bytes stored in output
*/
- public native static int doFinalByteArray(long context, byte[] output,
+ public static native int doFinalByteArray(long context, byte[] output,
int offset, int maxOutputLength);
/**
@@ -150,7 +150,7 @@ class OpenSslNative {
* @param data byte buffer or null
* @return return 0 if there is any error, else return 1.
*/
- public native static int ctrl(long context, int type, int arg, byte[] data);
+ public static native int ctrl(long context, int type, int arg, byte[] data);
/**
@@ -158,5 +158,5 @@ class OpenSslNative {
*
* @param context The cipher context address
*/
- public native static void clean(long context);
+ public static native void clean(long context);
}
diff --git a/src/main/java/org/apache/commons/crypto/random/OpenSslCryptoRandomNative.java b/src/main/java/org/apache/commons/crypto/random/OpenSslCryptoRandomNative.java
index d4ee543..f52cf79 100644
--- a/src/main/java/org/apache/commons/crypto/random/OpenSslCryptoRandomNative.java
+++ b/src/main/java/org/apache/commons/crypto/random/OpenSslCryptoRandomNative.java
@@ -35,7 +35,7 @@ class OpenSslCryptoRandomNative {
/**
* Declares a native method to initialize SR.
*/
- public native static void initSR();
+ public static native void initSR();
/**
* Judges whether use {@link OpenSslCryptoRandomNative} to generate the
@@ -45,5 +45,5 @@ class OpenSslCryptoRandomNative {
* @return true if use {@link OpenSslCryptoRandomNative} to generate the
* user-specified number of random bits.
*/
- public native static boolean nextRandBytes(byte[] bytes);
+ public static native boolean nextRandBytes(byte[] bytes);
}