mirror of
https://gitee.com/dromara/MaxKey.git
synced 2026-05-14 20:50:14 +08:00
Auto-generated method stub
This commit is contained in:
@@ -206,7 +206,7 @@ public final class KeyPairUtil
|
||||
}
|
||||
else if (pubKey instanceof ECKey)
|
||||
{
|
||||
// TODO: how to get key size from these?
|
||||
// how to get key size from these?
|
||||
return UNKNOWN_KEY_SIZE;
|
||||
}
|
||||
|
||||
@@ -236,7 +236,7 @@ public final class KeyPairUtil
|
||||
}
|
||||
else if (keyParams instanceof ECKeyParameters)
|
||||
{
|
||||
// TODO: how to get key length from these?
|
||||
// how to get key length from these?
|
||||
return UNKNOWN_KEY_SIZE;
|
||||
}
|
||||
|
||||
|
||||
@@ -162,7 +162,6 @@ public final class ReciprocalUtils {
|
||||
try {
|
||||
simple = new String(byteFinal, "UTF-8");
|
||||
} catch (UnsupportedEncodingException e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
}
|
||||
return simple;
|
||||
|
||||
@@ -45,10 +45,10 @@ public final class NetUtil
|
||||
/** Logger */
|
||||
private static final Logger _logger = LoggerFactory.getLogger(NetUtil.class);
|
||||
|
||||
// TODO: make this configurable
|
||||
// make this configurable
|
||||
private static final int CONNECT_TIMEOUT = 10000;
|
||||
|
||||
// TODO: make this configurable
|
||||
// make this configurable
|
||||
private static final int READ_TIMEOUT = 20000;
|
||||
|
||||
/**
|
||||
@@ -74,7 +74,7 @@ public final class NetUtil
|
||||
conn.setConnectTimeout(CONNECT_TIMEOUT);
|
||||
conn.setReadTimeout(READ_TIMEOUT);
|
||||
|
||||
// TODO: User-Agent?
|
||||
// User-Agent?
|
||||
|
||||
return conn.getInputStream();
|
||||
}
|
||||
@@ -97,7 +97,7 @@ public final class NetUtil
|
||||
conn.setConnectTimeout(CONNECT_TIMEOUT);
|
||||
conn.setReadTimeout(READ_TIMEOUT);
|
||||
|
||||
// TODO: User-Agent?
|
||||
// User-Agent?
|
||||
|
||||
if (contentType != null)
|
||||
{
|
||||
|
||||
@@ -64,7 +64,7 @@ public interface JwtEncryptionAndDecryptionService {
|
||||
public Collection<EncryptionMethod> getAllEncryptionEncsSupported();
|
||||
|
||||
/**
|
||||
* TODO add functionality for encrypting and decrypting using a specified key id.
|
||||
* add functionality for encrypting and decrypting using a specified key id.
|
||||
* Example: public void encryptJwt(EncryptedJWT jwt, String kid);
|
||||
*/
|
||||
}
|
||||
|
||||
@@ -230,7 +230,7 @@ public class DefaultJwtEncryptionAndDecryptionService implements JwtEncryptionAn
|
||||
logger.warn("No private key for key #" + jwk.getKeyID());
|
||||
}
|
||||
|
||||
// TODO: add support for EC keys
|
||||
// add support for EC keys
|
||||
|
||||
} else if (jwk instanceof OctetSequenceKey) {
|
||||
// build symmetric encrypters and decrypters
|
||||
|
||||
@@ -77,6 +77,6 @@ public interface JwtSigningAndValidationService {
|
||||
public String getDefaultSignerKeyId();
|
||||
|
||||
/**
|
||||
* TODO: method to sign a jwt using a specified algorithm and a key id
|
||||
* method to sign a jwt using a specified algorithm and a key id
|
||||
*/
|
||||
}
|
||||
|
||||
@@ -99,7 +99,7 @@ public class DefaultJwtSigningAndValidationService implements JwtSigningAndValid
|
||||
for (JWK key : keyStore.getKeys()) {
|
||||
if (!Strings.isNullOrEmpty(key.getKeyID())) {
|
||||
// use the key ID that's built into the key itself
|
||||
// TODO (#641): deal with JWK thumbprints
|
||||
// (#641): deal with JWK thumbprints
|
||||
this.keys.put(key.getKeyID(), key);
|
||||
} else {
|
||||
// create a random key id
|
||||
@@ -173,7 +173,7 @@ public class DefaultJwtSigningAndValidationService implements JwtSigningAndValid
|
||||
} else if (jwk instanceof ECKey) {
|
||||
// build EC signers & verifiers
|
||||
|
||||
// TODO: add support for EC keys
|
||||
// add support for EC keys
|
||||
logger.warn("EC Keys are not yet supported.");
|
||||
|
||||
} else if (jwk instanceof OctetSequenceKey) {
|
||||
|
||||
@@ -93,7 +93,7 @@ public class SymmetricCacheService {
|
||||
try {
|
||||
|
||||
String id = "SYMMETRIC-KEY";
|
||||
//TODO:
|
||||
|
||||
JWK jwk =null;
|
||||
//JWK jwk = new OctetSequenceKey(Base64URL.encode(key), KeyUse.SIGNATURE, null, null, id, null, null, null);
|
||||
Map<String, JWK> keys = ImmutableMap.of(id, jwk);
|
||||
|
||||
@@ -56,7 +56,6 @@ public class SymmetricSigningAndValidationServiceBuilder {
|
||||
/**
|
||||
* Builder Symmetric Signing And Validation Service
|
||||
*/
|
||||
//TODO:
|
||||
JWK jwk = null;
|
||||
//JWK jwk = new OctetSequenceKey(Base64URL.encode(sharedSecret), KeyUse.SIGNATURE, null, null, SYMMETRIC_KEY, null, null, null);
|
||||
Map<String, JWK> keys = ImmutableMap.of(SYMMETRIC_KEY, jwk);
|
||||
|
||||
@@ -234,7 +234,7 @@ public final class KeyStoreUtil {
|
||||
* @return available keystore types
|
||||
*/
|
||||
public static KeyStoreType[] getAvailableTypes() {
|
||||
// TODO: populate only once
|
||||
// populate only once
|
||||
KeyStoreType[] known = KeyStoreType.values();
|
||||
ArrayList<KeyStoreType> available = new ArrayList<KeyStoreType>();
|
||||
for (KeyStoreType type : known) {
|
||||
|
||||
@@ -51,10 +51,8 @@ public class Copyright4RZ {
|
||||
try {
|
||||
writer = new OutputStreamWriter(new FileOutputStream("D:/MaxKey/code.txt"), encode);
|
||||
} catch (UnsupportedEncodingException e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
} catch (FileNotFoundException e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,7 +3,6 @@ package org.maxkey;
|
||||
public class Integer2LongTest {
|
||||
|
||||
public static void main(String[] args) {
|
||||
// TODO Auto-generated method stub
|
||||
Integer intValue =20000;
|
||||
Long v=Integer.toUnsignedLong(intValue);
|
||||
System.out.println(v);
|
||||
|
||||
@@ -26,7 +26,6 @@ public class Base64UtilsTest {
|
||||
*/
|
||||
@Test
|
||||
public void test() {
|
||||
// TODO Auto-generated method stub
|
||||
String encode=Base64Utils.encoder("base64ToFile".getBytes());
|
||||
System.out.println(encode);
|
||||
String decode=Base64Utils.decode(encode);
|
||||
|
||||
@@ -23,11 +23,9 @@ import java.io.FileNotFoundException;
|
||||
public class Md5SumTest {
|
||||
|
||||
public Md5SumTest() {
|
||||
// TODO Auto-generated constructor stub
|
||||
}
|
||||
|
||||
public static void main(String[] args) throws FileNotFoundException {
|
||||
// TODO Auto-generated method stub
|
||||
//String md5value=Md5Sum.produce(new File("E:/transwarp-4.3.4-Final-el6/transwarp-4.3.4-Final-26854-zh.el6.x86_64.tar.gz"));
|
||||
File f=new File("E:/Soft/Xmanager4_setup.1410342608.exe");
|
||||
String md5value=Md5Sum.produce(f);
|
||||
|
||||
@@ -22,11 +22,9 @@ import org.maxkey.crypto.password.PasswordGen;
|
||||
public class PasswordGenTest {
|
||||
|
||||
public PasswordGenTest() {
|
||||
// TODO Auto-generated constructor stub
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
// TODO Auto-generated method stub
|
||||
PasswordGen gen=new PasswordGen();
|
||||
System.out.println(gen.gen(2,2,2,1));
|
||||
for(int i=1;i<100;i++){
|
||||
|
||||
@@ -22,11 +22,9 @@ import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
|
||||
public class SCryptPasswordEncoderTest {
|
||||
|
||||
public SCryptPasswordEncoderTest() {
|
||||
// TODO Auto-generated constructor stub
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
// TODO Auto-generated method stub
|
||||
BCryptPasswordEncoder pe=new BCryptPasswordEncoder();
|
||||
//String c="$e0801$7Holo9EgzBeg5xf/WLZu3/5IQwOyEPDLJPgMXkF9jnekBrbQUMt4CF9O2trkz3zBCnCLpUMR437q/AjQ5TTToA==$oYB8KRSxAsxkKkt5r79W6r6P0wTUcKwGye1ivXRN0Ts="
|
||||
//;
|
||||
|
||||
@@ -22,11 +22,10 @@ import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
|
||||
public class PasswordReciprocalTest {
|
||||
|
||||
public PasswordReciprocalTest() {
|
||||
// TODO Auto-generated constructor stub
|
||||
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
// TODO Auto-generated method stub
|
||||
BCryptPasswordEncoder spe= new BCryptPasswordEncoder();
|
||||
String pass=PasswordReciprocal.getInstance().rawPassword("admin", "admin");
|
||||
String epass=spe.encode(pass);
|
||||
|
||||
@@ -20,7 +20,6 @@ package org.maxkey.crypto.password;
|
||||
public class SM3PasswordEncoderTest {
|
||||
|
||||
public static void main(String[] args) {
|
||||
// TODO Auto-generated method stub
|
||||
SM3PasswordEncoder sm3 = new SM3PasswordEncoder();
|
||||
System.out.println(sm3.encode("maxkeypassword"));
|
||||
|
||||
|
||||
@@ -20,7 +20,6 @@ package org.maxkey.util;
|
||||
public class IdSequenceTest {
|
||||
|
||||
public static void main(String[] args) {
|
||||
// TODO Auto-generated method stub
|
||||
long s =System.currentTimeMillis();
|
||||
int k;
|
||||
for(int i=1;i<=10010;i++){
|
||||
|
||||
@@ -20,7 +20,6 @@ package org.maxkey.util;
|
||||
public class MacAddressTest {
|
||||
|
||||
public static void main(String[] args) {
|
||||
// TODO Auto-generated method stub
|
||||
System.out.println(MacAddress.getAllHostMacAddress());
|
||||
}
|
||||
|
||||
|
||||
@@ -25,7 +25,6 @@ public class ObjectTransformerTest {
|
||||
* @param args
|
||||
*/
|
||||
public static void main(String[] args) {
|
||||
// TODO Auto-generated method stub
|
||||
HashMap<String, Object> ut=new HashMap<String, Object>();
|
||||
|
||||
ut.put("username","shimingxy");
|
||||
|
||||
@@ -23,7 +23,6 @@ public class CharacterCase {
|
||||
* @param args
|
||||
*/
|
||||
public static void main(String[] args) {
|
||||
// TODO Auto-generated method stub
|
||||
String word="partner ";
|
||||
|
||||
System.out.println(word.toUpperCase());
|
||||
|
||||
@@ -23,7 +23,6 @@ public class SubStr {
|
||||
* @param args
|
||||
*/
|
||||
public static void main(String[] args) {
|
||||
// TODO Auto-generated method stub
|
||||
String browser="Chrome/44.0.2369.0";
|
||||
System.out.println(browser.indexOf('.'));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user