All Downloads are FREE. Search and download functionalities are using the official Maven repository.

de.tsl2.nano.core.secure.Crypt.class Maven / Gradle / Ivy

Go to download

TSL2 Framework Html5 Extensions (WebServer, Html5Presentation, RuleCover, BeanConfigurator, LogicTable-Sheet, Expression-Descriptors for Actions, Rules, URLs, Queries)

There is a newer version: 2.5.2
Show newest version
????=?AES
de/tsl2/nano/core/secure/CryptgenerateRandomKey'(Ljava/lang/String;)Ljava/security/Key;
AES/CBC/PKCS5PaddingUTF-8
;(Ljava/security/Key;Ljava/lang/String;Ljava/lang/String;Z)VDES/ECB/PKCS5Padding
generateSecretKey)([BLjava/lang/String;)Ljava/security/Key;
getAlgorithmFromPath&(Ljava/lang/String;)Ljava/lang/String;
generateKey !"#java/security/KeygetAlgorithm()Ljava/lang/String;
%&'(java/lang/Object()V	*+,keyLjava/security/Key;	./0	algorithmLjava/lang/String;	230encoding	567	useBASE64Z
9:;createParamSpecR(Ljava/lang/String;Ljava/security/Key;)Ljava/security/spec/AlgorithmParameterSpec;	=>?	paramSpec+Ljava/security/spec/AlgorithmParameterSpec;	ABCLOG Lorg/apache/commons/logging/Log;EFGHIorg/apache/commons/logging/LogisDebugEnabled()Z
KL#	providersENOPdebug(Ljava/lang/Object;)V
RSTprovide(Ljava/lang/String;)V
VWXisPBE(Ljava/lang/String;)Z
Z[\toCharArray([B)[C
^_`generatePBEKey)([CLjava/lang/String;)Ljava/security/Key;bjava/lang/String
ade([BLjava/lang/String;)V
ag[h()[Cj$java/io/UnsupportedEncodingException
lmnop"de/tsl2/nano/core/ManagedExceptionforward,(Ljava/lang/Throwable;)Ljava/lang/Throwable;rstmakeConcatWithConstantsJ(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;v/
xyz{t!de/tsl2/nano/core/util/StringUtil	substring}java/lang/StringBuilderavailable security providers:

|?T
?????java/security/SecuritygetProviders()[Ljava/security/Provider;
????#java/security/ProvidergetInfo?s
|???append-(Ljava/lang/String;)Ljava/lang/StringBuilder;
|??#toString
?????javax/crypto/SecretKeyFactorygetInstance3(Ljava/lang/String;)Ljavax/crypto/SecretKeyFactory;?java/lang/Exception
??TdownloadProvider
?????java/lang/Thread
currentThread()Ljava/lang/Thread;
????getContextClassLoader()Ljava/lang/ClassLoader;?0de/tsl2/nano/core/classloader/NetworkClassLoader?.de/tsl2/nano/core/execution/CompatibilityLayer
?&?$de.tsl2.nano.jarresolver.JarResolver?org.bouncycastle
????runOptionalMain((Ljava/lang/String;[Ljava/lang/String;)V
???createPBEParamSpec-()Ljava/security/spec/AlgorithmParameterSpec;
a???contains(Ljava/lang/CharSequence;)Z?ECB?!javax/crypto/spec/IvParameterSpec?DES
a??X
startsWith	???salt8[B	???salt16
???([B)V?RSA?)java/security/spec/RSAKeyGenParameterSpec	????F4Ljava/math/BigInteger;
???(ILjava/math/BigInteger;)V?"javax/crypto/spec/PBEParameterSpec
???([BI)V
??TpreInit?javax/crypto/spec/SecretKeySpec
?d?javax/crypto/spec/PBEKeySpec
???([C)V
????generateSecret6(Ljava/security/spec/KeySpec;)Ljavax/crypto/SecretKey;
?????javax/crypto/KeyGenerator/(Ljava/lang/String;)Ljavax/crypto/KeyGenerator;?java/security/SecureRandom
?&
????init(Ljava/security/SecureRandom;)V
??()Ljavax/crypto/SecretKey;
?java/security/KeyPairGenerator4(Ljava/lang/String;)Ljava/security/KeyPairGenerator;
:?(Ljava/lang/String;)Ljava/security/spec/AlgorithmParameterSpec;


initialize.(Ljava/security/spec/AlgorithmParameterSpec;)V
generateKeyPair()Ljava/security/KeyPair;SHA1PRNG
generatePassword(Ljava/lang/String;[B)V
xtoHexString([B)Ljava/lang/String;
??0(Ljava/lang/String;)Ljava/security/SecureRandom;
? ?	nextBytes"&java/security/NoSuchAlgorithmException$PBE&SHA-512
()*hashHex8(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;,UTF8.s*
x012
toInputStream)(Ljava/lang/String;)Ljava/io/InputStream;
4)5;(Ljava/io/InputStream;Ljava/lang/String;)Ljava/lang/String;
789hash+(Ljava/io/InputStream;Ljava/lang/String;)[B
;<hex
>?@?Ajava/security/MessageDigest1(Ljava/lang/String;)Ljava/security/MessageDigest;
>CD?updateFjava/security/DigestInputStream
EHI5(Ljava/io/InputStream;Ljava/security/MessageDigest;)V
EKLMread()I
EOPQgetMessageDigest()Ljava/security/MessageDigest;
>STUdigest()[BW.*
YZ[encrypt>(Ljava/io/InputStream;Ljava/lang/String;)Ljava/io/InputStream;] de/tsl2/nano/core/secure/Crypt$1_javax/crypto/Cipher
abccipherh(Ljava/lang/String;ILjava/security/Key;Ljava/security/spec/AlgorithmParameterSpec;)Ljavax/crypto/Cipher;
\efM(Lde/tsl2/nano/core/secure/Crypt;Ljava/io/InputStream;Ljavax/crypto/Cipher;)V
hi[decryptk de/tsl2/nano/core/secure/Crypt$2
je
anopgetBytes(Ljava/lang/String;)[B
r+s()Ljava/security/Key;
auvMlength
xZy{([BLjava/security/Key;Ljava/security/spec/AlgorithmParameterSpec;Ljava/lang/String;Ljava/lang/String;ZII)Ljava/lang/String;
a{oU
^}~doFinal([BII)[B
??encodeBase64
?????java/util/Base64
getEncoder()Ljava/util/Base64$Encoder;
????java/util/Base64$EncoderencodeToString
^???)(Ljava/lang/String;)Ljavax/crypto/Cipher;
^???B(ILjava/security/Key;Ljava/security/spec/AlgorithmParameterSpec;)V?java/lang/Integer???
?i??(Ljava/lang/String;Ljava/security/Key;Ljava/security/spec/AlgorithmParameterSpec;Ljava/lang/String;Ljava/lang/String;ZII)Ljava/lang/String;
??pdecodeBase64
????
getDecoder()Ljava/util/Base64$Decoder;
????pjava/util/Base64$Decoderdecode	?????java/lang/SystemoutLjava/io/PrintStream;
????Tjava/io/PrintStreamprintln?-file:
??getFileName?java/io/InputStream
?????java/lang/ClassisAssignableFrom(Ljava/lang/Class;)Z
????2de/tsl2/nano/core/util/FileUtilgetFile
????getFileBytes-(Ljava/lang/String;Ljava/lang/ClassLoader;)[B
a??"java/lang/IllegalArgumentException?s?%(Ljava/lang/Class;)Ljava/lang/String;
???'java/lang/UnsupportedOperationException
?&?SHA-256
??*sign
?Z
???verify9(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V
?i
a???equals(Ljava/lang/Object;)Z?java/lang/IllegalStateException?3the given signature does not fit to the datas hash!
??
%???getClass()Ljava/lang/Class;
?????java/lang/BooleanvalueOf(Z)Ljava/lang/Boolean;
?????de/tsl2/nano/core/util/Util8(Ljava/lang/Class;[Ljava/lang/Object;)Ljava/lang/String;8
???getData7(Ljava/lang/String;Ljava/lang/Class;)Ljava/lang/Object;
x???
cryptoHash((Ljava/lang/String;Ljava/lang/String;)[B.
Tlog
d-base64
	
de/tsl2/nano/core/util/ByteUtiltoByteArray(Ljava/io/InputStream;)[B?
?
writeBytes([BLjava/lang/String;Z)V
getInputStream([B)Ljava/io/InputStream;?
?write*(Ljava/io/InputStream;Ljava/lang/String;)J??]usage: Crypt   *  example 1: Crypt mYpASsWord AES meintext!'  example 2: Crypt hash 32 MD5 meintext#8  example 3: Crypt mYpASsWord AES -file:meintextfile.txt%O  example 4: Crypt mYpASsWord AES -file:meintextfile.txt -base64 -include:[^;]+'  algorithms are:)?  AES,AESWrap,ARCFOUR,Blowfish,CCM,DES,DESede,DESedeWrap,ECIES,GCM,PBEWithAnd,RC2,RC4,RC5,RSA
  Hash: MD2, MD5, SHA, SHA-1, SHA-256, SHA-384, SHA-512	?,x  for further informations see: http://docs.oracle.com/javase/7/docs/technotes/guides/security/StandardNames.html#Cipher
./012 de/tsl2/nano/core/log/LogFactorygetLog3(Ljava/lang/Class;)Lorg/apache/commons/logging/Log;4 de/tsl2/nano/core/secure/ISecureENCODE_UTF8
ConstantValueALGO_DESALGO_AESALGO_AES_NOPADDING;AES/CBC/NoPaddingALGO_PBEWithSHAAndAES>PBEWithSHAAndAESALGO_PBEWithMD5AndDESAPBEWithMD5AndDESALGO_PBEWithHmacSHA1AndDESedeDPBEWithHmacSHA1AndDESedeHASH_SHA_256CodeLineNumberTableLocalVariableTablethis Lde/tsl2/nano/core/secure/Crypt;pwd
StackMapTable?(Ljava/security/Key;)Ve&Ljava/io/UnsupportedEncodingException;getTransformationPathmodepaddingpathiIpsLjava/lang/StringBuilder;[Ljava/security/Provider;YLjava/lang/Exception;
algorithm2clLjava/lang/ClassLoader;`java/lang/ClassLoaderb)java/security/spec/AlgorithmParameterSpec
pbeKeySpecLjavax/crypto/spec/PBEKeySpec;keyFacLjavax/crypto/SecretKeyFactory;[C	generatorLjavax/crypto/KeyGenerator;+(Ljava/lang/String;)Ljava/security/KeyPair;kpg Ljava/security/KeyPairGenerator;(B)Ljava/lang/String;BpasswordBuffer(Ljava/security/NoSuchAlgorithmException;txtstreamLjava/io/InputStream;Ljava/security/MessageDigest;digestStream!Ljava/security/DigestInputStream;,(Ljava/io/InputStream;)Ljava/io/InputStream;contentExpressiondata;([BLjava/security/Key;Ljava/lang/String;)Ljava/lang/String;rawoffsetexspecLjavax/crypto/Cipher;
Exceptions	encryptedv(Ljava/lang/String;Ljava/security/Key;Ljava/security/spec/AlgorithmParameterSpec;Ljava/lang/String;)Ljava/lang/String;bytesbase64Length(I)Inbase64ToByteLengthargtypeLjava/lang/Class;LocalVariableTypeTableLjava/lang/Class;	SignatureC(Ljava/lang/String;Ljava/lang/Class;)TT;
canDecryptvalidatecertificate
hashAlgorithm'(Ljava/lang/String;Ljava/lang/String;)V	signaturemain([Ljava/lang/String;)Vbase64iiincludecargs[Ljava/lang/String;?
SourceFile
Crypt.javaNestMembersBootstrapMethods?
???s?$java/lang/invoke/StringConcatFactory?(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/invoke/CallSite;?//?	
?? not allowed!?:?.encrypted?.decrypted?encrypted:?decrypted:?  providers are:
InnerClassesEncoderDecoder?%java/lang/invoke/MethodHandles$Lookup?java/lang/invoke/MethodHandlesLookup!%3BC+,30/067>?506706806	906:<06=?06@B06CE06?????:(F=*?	?
?G
}~HIJ?F?(*++?+???	?+???	?
?G??$?'?H(IJ(K?LS?MM?MM?MMa?M?MaeFS*+,??,?
?G
??H IJK?/0NFG*++??
?G
??HIJ+,F?#*?$*+?)*,?-*-?1*?4*,+?8?E
??a?ZwF=	*+V?X?G?H	IJ	rsZ[F?"?\Y*+*?-*?)*??4/04304674|V4vVL(?MJa?Maaa??F2??*???GH{?<F/*??GHy?bcF?+:*??:?:*??*??:??,-???	!G*

	
 (H>}p+/0+RV++,+~?(bL?aa^!??iF?++*?)*?<*?-*?1*?4*?4?	??+?t???GH+IJ+?0L??#aaaaa?aaaaa	itFZ*+?z,??,?,????G$H ?0+0/0i?FW*+,-????G,H*?0+,>?/0i?F-
N?
*???	*?m:??	??6-+,?`?|:	?aY	?c?:?kW?CD?G:=&?8BDCFDLEHp0{?8??	FO[N?0N+,N>?N/0N30N67N|VNvVL+EM?MA?aaaa???FPlhp??`?GJH?VLO???FPlhp??d?GNH?VLO??pF2??*???GRH?0TF6??*???G
VWHq0??F?D*??ƙ;*??K?+???*???a+????aY*?÷ǰ??Y+???Ϳ*?G"Z
[\]^'_4aBdHD?0D???D??L
???F3	*??w?GiH	?0?IF,?GqHIJ??F<??Y?пG{HIJ???F=	*+ѶӰGH	IJ	y0?*FH
*+,?'?ְG?H 
IJ
y0
?0??FL
*+,ѶرG
?	?H 
IJ
y0
?0??F?$+-?':*,??:?ޚ??Y?濱G????#?H>$IJ$y0$?0$?080?0L?#aa?#F\2*???%Y*?-SY*?1SY*?4??SY*???6*??
*2?:+,??????X:?H????z:,????
+?aY?Ǹ???g:,????X?8,????X+,???????g:,????X?+,??YM??+,?ܺ??>?? ?"?$?&?(??J?*?+??G?#???.?4?:?K?O?Y?m?x???????????????????
???+?8?;?A?G?M?S?Y?_?e?p?v?HR?5??m??7x??V???0?~rsK??JO?q0w??L;
4?6a@?@?@a?\a??4?a?:?(F???-?@?YqTY7TY0TY#TY?TY?TY?TY?T???YqTY7TY0TY#TYETYRTYTYTYcTY	?TY
'TYrTY?TY
?TY?TY?T?ͱGZm9r???j\?>
?????????????????????*\j???	???	???




© 2015 - 2024 Weber Informatics LLC | Privacy Policy