beacon-chain-java
beacon-chain-java copied to clipboard
Hashing by JCA API without performance loss
See: org.ethereum.beacon.crypto.Hashes#digestUsingAlgorithm
The default java Provider.Service class instantiates Digest using reflection which causes 10-15% of performance degradation (it looks up the class constructor on each instantiation). The Service class javadoc says this behavior can be altered by a provider but either Bouncycastle haven't done it or we don't perform any additional tasks