-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add SHA3 implementation #7
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -250,6 +250,45 @@ public final class korlibs/crypto/SHA256Kt { | |
public static final fun sha256 ([B)Lkorlibs/crypto/Hash; | ||
} | ||
|
||
public class korlibs/crypto/SHA3 : korlibs/crypto/Hasher { | ||
public static final field Companion Lkorlibs/crypto/SHA3$Companion; | ||
public static final field KECCAKF_ROUNDS I | ||
public static final field SHA3_KECCAK_SPONGE_WORDS I | ||
Comment on lines
+255
to
+256
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. private |
||
protected fun coreDigest ([B)V | ||
protected fun corePadding (J)[B | ||
protected fun coreReset ()V | ||
protected fun coreUpdate ([B)V | ||
} | ||
|
||
public final class korlibs/crypto/SHA3$Companion : korlibs/crypto/HasherFactory { | ||
public final fun getKECCAKF_PI_LANE ()[I | ||
public final fun getKECCAKF_ROTATION_OFFSETS ()[I | ||
public final fun getKECCAKF_ROUND_CONSTANTS-Y2RjT0g ()[J | ||
Comment on lines
+264
to
+266
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. private |
||
} | ||
|
||
public final class korlibs/crypto/SHA3Kt { | ||
public static final fun sha3_224 ([B)Lkorlibs/crypto/Hash; | ||
public static final fun sha3_256 ([B)Lkorlibs/crypto/Hash; | ||
public static final fun sha3_384 ([B)Lkorlibs/crypto/Hash; | ||
public static final fun sha3_512 ([B)Lkorlibs/crypto/Hash; | ||
} | ||
|
||
public final class korlibs/crypto/SHA3_224 : korlibs/crypto/HasherFactory { | ||
public static final field INSTANCE Lkorlibs/crypto/SHA3_224; | ||
} | ||
|
||
public final class korlibs/crypto/SHA3_256 : korlibs/crypto/HasherFactory { | ||
public static final field INSTANCE Lkorlibs/crypto/SHA3_256; | ||
} | ||
|
||
public final class korlibs/crypto/SHA3_384 : korlibs/crypto/HasherFactory { | ||
public static final field INSTANCE Lkorlibs/crypto/SHA3_384; | ||
} | ||
|
||
public final class korlibs/crypto/SHA3_512 : korlibs/crypto/HasherFactory { | ||
public static final field INSTANCE Lkorlibs/crypto/SHA3_512; | ||
} | ||
|
||
public final class korlibs/crypto/SHA512 : korlibs/crypto/SHA { | ||
public static final field Companion Lkorlibs/crypto/SHA512$Companion; | ||
public fun <init> ()V | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -245,6 +245,45 @@ public final class korlibs/crypto/SHA256Kt { | |
public static final fun sha256 ([B)Lkorlibs/crypto/Hash; | ||
} | ||
|
||
public class korlibs/crypto/SHA3 : korlibs/crypto/Hasher { | ||
public static final field Companion Lkorlibs/crypto/SHA3$Companion; | ||
public static final field KECCAKF_ROUNDS I | ||
public static final field SHA3_KECCAK_SPONGE_WORDS I | ||
Comment on lines
+250
to
+251
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. private |
||
protected fun coreDigest ([B)V | ||
protected fun corePadding (J)[B | ||
protected fun coreReset ()V | ||
protected fun coreUpdate ([B)V | ||
} | ||
|
||
public final class korlibs/crypto/SHA3$Companion : korlibs/crypto/HasherFactory { | ||
public final fun getKECCAKF_PI_LANE ()[I | ||
public final fun getKECCAKF_ROTATION_OFFSETS ()[I | ||
public final fun getKECCAKF_ROUND_CONSTANTS-Y2RjT0g ()[J | ||
Comment on lines
+259
to
+261
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. private |
||
} | ||
|
||
public final class korlibs/crypto/SHA3Kt { | ||
public static final fun sha3_224 ([B)Lkorlibs/crypto/Hash; | ||
public static final fun sha3_256 ([B)Lkorlibs/crypto/Hash; | ||
public static final fun sha3_384 ([B)Lkorlibs/crypto/Hash; | ||
public static final fun sha3_512 ([B)Lkorlibs/crypto/Hash; | ||
} | ||
|
||
public final class korlibs/crypto/SHA3_224 : korlibs/crypto/HasherFactory { | ||
public static final field INSTANCE Lkorlibs/crypto/SHA3_224; | ||
} | ||
|
||
public final class korlibs/crypto/SHA3_256 : korlibs/crypto/HasherFactory { | ||
public static final field INSTANCE Lkorlibs/crypto/SHA3_256; | ||
} | ||
|
||
public final class korlibs/crypto/SHA3_384 : korlibs/crypto/HasherFactory { | ||
public static final field INSTANCE Lkorlibs/crypto/SHA3_384; | ||
} | ||
|
||
public final class korlibs/crypto/SHA3_512 : korlibs/crypto/HasherFactory { | ||
public static final field INSTANCE Lkorlibs/crypto/SHA3_512; | ||
} | ||
|
||
public final class korlibs/crypto/SHA512 : korlibs/crypto/SHA { | ||
public static final field Companion Lkorlibs/crypto/SHA512$Companion; | ||
public fun <init> ()V | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make it final