com.groupbyinc.flux.common.apache.commons.codec.digest.Sha2Crypt.class Maven / Gradle / Ivy
???? 2 ? @com/groupbyinc/flux/common/apache/commons/codec/digest/Sha2Crypt java/lang/Object Sha2Crypt.java ROUNDS_DEFAULT I ?
ROUNDS_MAX;???
ROUNDS_MIN ?
ROUNDS_PREFIX Ljava/lang/String; rounds= SHA256_BLOCKSIZE
SHA256_PREFIX $5$ SHA512_BLOCKSIZE @
SHA512_PREFIX $6$ SALT_PATTERN Ljava/util/regex/Pattern; ()V
this BLcom/groupbyinc/flux/common/apache/commons/codec/digest/Sha2Crypt; sha256Crypt ([B)Ljava/lang/String; (([BLjava/lang/String;)Ljava/lang/String; # %
& keyBytes [B java/lang/StringBuilder *
+ append -(Ljava/lang/String;)Ljava/lang/StringBuilder; - .
+ / :com/groupbyinc/flux/common/apache/commons/codec/digest/B64 1
getRandomSalt (I)Ljava/lang/String; 3 4
2 5 toString ()Ljava/lang/String; 7 8
+ 9 SHA-256 ; sha2Crypt M([BLjava/lang/String;Ljava/lang/String;ILjava/lang/String;)Ljava/lang/String; = >
? salt "java/lang/IllegalArgumentException B Salt must not be null D (Ljava/lang/String;)V F
C G I java/util/regex/Pattern K matcher 3(Ljava/lang/CharSequence;)Ljava/util/regex/Matcher; M N
L O java/util/regex/Matcher Q find ()Z S T
R U Invalid salt value: W group Y 4
R Z java/lang/Integer \ parseInt (Ljava/lang/String;)I ^ _
] ` java/lang/Math b min (II)I d e
c f max h e
c i 8com/groupbyinc/flux/common/apache/commons/codec/Charsets k UTF_8 Ljava/nio/charset/Charset; m n l o java/lang/String q getBytes (Ljava/nio/charset/Charset;)[B s t
r u Bcom/groupbyinc/flux/common/apache/commons/codec/digest/DigestUtils w getDigest 1(Ljava/lang/String;)Ljava/security/MessageDigest; y z
x { java/security/MessageDigest } update ([B)V ?
~ ? digest ()[B ? ?
~ ? ) ([BII)V ?
~ ? java/lang/System ? arraycopy *(Ljava/lang/Object;ILjava/lang/Object;II)V ? ?
? ?
+ G (I)Ljava/lang/StringBuilder; - ?
+ ? $ ? b64from24bit (BBBILjava/lang/StringBuilder;)V ? ?
2 ? java/util/Arrays ? fill ([BB)V ? ?
? ? reset ?
~ ? i
saltPrefix blocksize algorithm keyLen rounds roundsCustom Z m Ljava/util/regex/Matcher;
saltString saltBytes saltLen ctx Ljava/security/MessageDigest; altCtx altResult cnt
tempResult pBytes cp sBytes buffer Ljava/lang/StringBuilder; sha512Crypt ? %
? SHA-512 ? 5^\$([56])\$(rounds=(\d+)\$)?([\.\/a-zA-Z0-9]{1,16}).* ? compile -(Ljava/lang/String;)Ljava/util/regex/Pattern; ? ?
L ?
ConstantValue Code LocalVariableTable LineNumberTable
StackMapTable
SourceFile ! ? ?
?
? ? ? ? ? ? / *? ? ? ! " ? ) # $ ? 0 *? '? ? ( ) ? S # % ? m (+? ? +Y? ,? 0? 6? 0? :L*+