-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #15 from shiker1996/feature-1.3.1
improve plugin size and settings option
- Loading branch information
Showing
21 changed files
with
507 additions
and
680 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...a/tech/shiker/security/NoPaddingUtil.java → ...ava/tech/shiker/common/NoPaddingUtil.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package tech.shiker.security; | ||
package tech.shiker.common; | ||
|
||
import java.nio.charset.StandardCharsets; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
package tech.shiker.common; | ||
|
||
public enum SecurityInfo { | ||
|
||
AES_ECB_PKCS5_PADDING("AES", "AES/ECB/PKCS5Padding", -1, 16, false), | ||
AES_ECB_NO_PADDING("AES", "AES/ECB/NoPadding", -1, 16, true), | ||
AES_CBC_PKCS5_PADDING("AES", "AES/CBC/PKCS5Padding", 16, 16, false), | ||
AES_CBC_NO_PADDING("AES", "AES/CBC/NoPadding", 16, 16, true), | ||
DES_ECB_PKCS5_PADDING("DESede", "DESede/ECB/PKCS5Padding", -1, 24, false), | ||
DES_ECB_NO_PADDING("DESede", "DESede/ECB/NoPadding", -1, 24, true), | ||
DES_CBC_PKCS5_PADDING("DESede", "DESede/CBC/PKCS5Padding", 8, 24, false), | ||
DES_CBC_NO_PADDING("DESede", "DESede/CBC/NoPadding", 8, 24, true), | ||
PBE_WITH_MD5_AND_DES("PBEWithMD5AndDES", "PBEWithMD5AndDES", -1, 8), | ||
PBE_WITH_SHA1_AND_DES("PBEWithSHA1AndDESede", "PBEWithSHA1AndDESede", -1, 8), | ||
PBE_WITH_SHA256_AND_AES_128("PBEWithHmacSHA256AndAES_128", "PBEWithHmacSHA256AndAES_128", 16, 8), | ||
PBE_WITH_SHA512_AND_AES_256("PBEWithHmacSHA512AndAES_256", "PBEWithHmacSHA512AndAES_256", 16, 8), | ||
; | ||
|
||
private final String decryptType; | ||
|
||
private final String decryptInformation; | ||
|
||
private final int indexLength; | ||
|
||
private final int keyLength; | ||
|
||
private final int saltLength; | ||
|
||
private final int iterations; | ||
|
||
private final boolean handlePadding; | ||
|
||
SecurityInfo(String decryptType, String decryptInformation, int indexLength, int keyLength, boolean handlePadding) { | ||
this.decryptType = decryptType; | ||
this.decryptInformation = decryptInformation; | ||
this.indexLength = indexLength; | ||
this.keyLength = keyLength; | ||
this.saltLength = -1; | ||
this.iterations = -1; | ||
this.handlePadding = handlePadding; | ||
} | ||
|
||
SecurityInfo(String decryptType, String decryptInformation, int indexLength, int saltLength) { | ||
this.decryptType = decryptType; | ||
this.decryptInformation = decryptInformation; | ||
this.indexLength = indexLength; | ||
this.keyLength = -1; | ||
this.saltLength = saltLength; | ||
this.iterations = 0; | ||
this.handlePadding = false; | ||
} | ||
|
||
public String decryptType() { | ||
return decryptType; | ||
} | ||
|
||
public String decryptInformation() { | ||
return decryptInformation; | ||
} | ||
|
||
public int indexLength() { | ||
return indexLength; | ||
} | ||
|
||
public int keyLength() { | ||
return keyLength; | ||
} | ||
|
||
public int saltLength() { | ||
return saltLength; | ||
} | ||
|
||
public int iterations() { | ||
return iterations; | ||
} | ||
|
||
public boolean handlePadding() { | ||
return handlePadding; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
67 changes: 0 additions & 67 deletions
67
src/main/java/tech/shiker/security/AesCBCPkcs5PaddingSecurityInstance.java
This file was deleted.
Oops, something went wrong.
50 changes: 0 additions & 50 deletions
50
src/main/java/tech/shiker/security/AesECBNoPaddingSecurityInstance.java
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.