org.apache.jackrabbit.oak.spi.security.user.util.PasswordUtil.class Maven / Gradle / Ivy
???? 3X
K ? ?
I ?
? ?
I ?
I ? ?
? ? ? ?
? ?
? ?
I ?
?
I ?
?
I ?
I ?
I ? ? I ?
? ? ? ?
?
? ?
?
?
?
?
? ?
?
I ?
?
I ? ?
?
? ? ?
+ ?
+ ?
I ?
? ? ? ? ?
1 ?
? ?
? ?
I ? ?
7
?
?
log Lorg/slf4j/Logger; DELIMITER C
ConstantValue -
NO_ITERATIONS I ENCODING Ljava/lang/String;
PBKDF2_PREFIX DEFAULT_ALGORITHM DEFAULT_SALT_SIZE DEFAULT_ITERATIONS ? ()V Code LineNumberTable LocalVariableTable this ?Lorg/apache/jackrabbit/oak/spi/security/user/util/PasswordUtil; buildPasswordHash &(Ljava/lang/String;)Ljava/lang/String; password
Exceptions "RuntimeVisibleParameterAnnotations Ljavax/annotation/Nonnull; :(Ljava/lang/String;Ljava/lang/String;II)Ljava/lang/String; algorithm saltSize
iterations salt alg
StackMapTable ? Ljavax/annotation/Nullable; f(Ljava/lang/String;Lorg/apache/jackrabbit/oak/spi/security/ConfigurationParameters;)Ljava/lang/String; config @Lorg/apache/jackrabbit/oak/spi/security/ConfigurationParameters; isPlainTextPassword (Ljava/lang/String;)Z isSame (Ljava/lang/String;[C)Z hashedPassword [C '(Ljava/lang/String;Ljava/lang/String;)Z startPos hash e (Ljava/security/NoSuchAlgorithmException; &Ljava/io/UnsupportedEncodingException; ? ?
compareSecure i a b len bits generateHash K(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;I)Ljava/lang/String; digest data Ljava/lang/StringBuilder; pwd passwordHash ? generateSalt (I)Ljava/lang/String; random Ljava/security/SecureRandom; [B RuntimeVisibleAnnotations convertBytesToHex ([B)Ljava/lang/String; B arr$ len$ i$ bytes res ? convertHexToBytes (Ljava/lang/String;)[B s generatePBKDF2 L(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;II)Ljava/lang/String; key Ljava/security/Key; ,Ljava/security/spec/InvalidKeySpecException; keyLength factory Ljavax/crypto/SecretKeyFactory; saltBytes keyspec Ljava/security/spec/KeySpec; generateDigest 9(Ljava/lang/String;Ljava/lang/String;I)Ljava/lang/String; md Ljava/security/MessageDigest; extractAlgorithm end hashedPwd Ljavax/annotation/CheckForNull; extractSalt '(Ljava/lang/String;I)Ljava/lang/String; start extractIterations (Ljava/lang/String;I)I !Ljava/lang/NumberFormatException; str
SourceFile PasswordUtil.java ] ^ SHA-256 d j ? ? ? ? passwordHashAlgorithm java/lang/String passwordHashIterations ! java/lang/Integer"# passwordSaltSize ? e $ x |%# ? ? ? ? ? | &java/security/NoSuchAlgorithmException L M&'()* $java/io/UnsupportedEncodingException+, java/lang/StringBuilder-.-/01-2 PBKDF23 w ? ?4' ? ? UTF-85 ?6 ?7 java/security/SecureRandom89 ? ? ]:; { "java/lang/IllegalArgumentException Not a hex encoded byte array: ]*<=>?@ ? ? javax/crypto/spec/PBEKeySpecAB ]CDEFGH *java/security/spec/InvalidKeySpecException ]I?JK ^ ?LMNOP Invalid algorithm detected QIMRST java/lang/NumberFormatException &Expected number of iterations. Found: =org/apache/jackrabbit/oak/spi/security/user/util/PasswordUtilUVW java/lang/Object javax/crypto/SecretKeyFactory java/security/spec/KeySpec java/security/MessageDigest $com/google/common/base/Preconditions checkNotNull &(Ljava/lang/Object;)Ljava/lang/Object; >org/apache/jackrabbit/oak/spi/security/ConfigurationParameters getConfigValue 8(Ljava/lang/String;Ljava/lang/Object;)Ljava/lang/Object; valueOf (I)Ljava/lang/Integer; intValue ()I ([C)Ljava/lang/String; length
getMessage ()Ljava/lang/String; org/slf4j/Logger warn (Ljava/lang/String;)V charAt (I)C append (C)Ljava/lang/StringBuilder; -(Ljava/lang/String;)Ljava/lang/StringBuilder; isEmpty ()Z (I)Ljava/lang/StringBuilder;
startsWith toString getBytes org/apache/jackrabbit/util/Text ((Ljava/lang/String;[B)Ljava/lang/String; nextBytes ([B)V (I)V hexTable java/lang/Character digit (CI)I getInstance 3(Ljava/lang/String;)Ljavax/crypto/SecretKeyFactory; toCharArray ()[C ([C[BII)V generateSecret 6(Ljava/security/spec/KeySpec;)Ljavax/crypto/SecretKey; java/security/Key
getEncoded ()[B *(Ljava/lang/String;Ljava/lang/Throwable;)V 1(Ljava/lang/String;)Ljava/security/MessageDigest; reset ([B)[B indexOf (I)I substring (II)Ljava/lang/String; debug (II)I parseInt (Ljava/lang/String;)I org/slf4j/LoggerFactory getLogger %(Ljava/lang/Class;)Lorg/slf4j/Logger; 1 I K L M N O P Q R S P T U V P ( W V P # X V P Y S P Z [ S P \ ] ^ _ / *? ? ` ? a b c d e _ 6 *? ? ` K a f V g h i d j _ ? 3*? W? ?>? =? :+? ? +:*? ? ` " ` a
b d e g h ) i a > 3 f V 3 k V 3 l S 3 m S n V )
o V p ? q@ q g h i r d s _ ? @+? W+? ? M+
? ? ? ?
>+? ? ? ?
6*,? ? ` x y z $ { 7 } a 4 @ f V @ t u / k V $ m S 7 l S g h
i i v w _ B
*? ? ? ? ` ? a
f V p @ h r x y _ = *+? ? ? ` ? a z V f { h
r i x | _ p j*? ?*? M,? <,? `>*? :6? ? ``>*? 6+,? :*? ?? M? ,? ? ? M? ,? ? ? G K G [ ` N ? ? ? ? ? ? ? ? % ? / ? 6 ? A ? H ? K ? L ? X ? [ ? \ ? h ? a \ 2 } S + n V ( m S A ~ V = k V L ? \ ? j z V j f V p . ? / q q q q ? q q B ?O ? h
r i
? | _ ? V*? +? *? +? ? ?*? =+? ? ?? ?>6? *? +? ??>????? ? ? ` 2 ? ? ? ? # ? % ? ) ? + ? - ? 6 ? F ? L ? a 4 0 ? S V ? V V ? V ; ? S - ) ? S p
@ ? ? ? @ h
r r
? ? _ _ ?? Y? :{? +? }? W,? j,? !? c? Y? :,? *? W,? -? W? ? "-? W+#? $? *,+ ?? %:? ? &+? ':? W? +*(? )? *? W? &? ` > ? ? ? % ? . ? 9 ? E ? J ? V ? _ ? n ? z ? ? ? ? ? ? ? a R k ? V . T ? ? z ? V ? ? V ? k V ? n V ? m S ? ? ? p ? V ? ?? q?
g h i i r
? ? _ ` ? +Y? ,L?M+,? -,? .? ` ? ? ? ? a l S ? ?
n ? ? i
? ? _ ? I? Y*?h? /L*M,?>6? -,36+? 0z~4? W+? 0~4? W????+? &? ` 0 > D
a > ? ? 6 ? ? 3 ? S 0 ? S I ? ? = ? ? p ? ? ? ? ? / ? i
? ? _ ? ]*? <p? ? 1Y? Y? 2? *? ? &? 3?l?M>,?? *,*`? ? 4x*``? ? 4`?T????,? ` " & , 4 U [ a * . - ? S ] ? V X ? S , 1 ? ? p ? &? ?? , ? i
? ? _
C,? 5:+? 6:? 7Y*? 8? 9:? ::? ; : ? .?:? Y,? =? 5 6 <