Apple¶
Provides implementation of CryptographyProvider via CommonCrypto
For supported targets and algorithms, please consult Supported primitives section
Limitations¶
- KeyFormat: doesn’t support
JWKkey format yet - EC.PrivateKey:
DER,PEM,DER.SEC1,PEM.SEC1: to decode,publicKeyfield should be present inEcPrivateKeystructure specified in RFC5915. Not all implementations in the wild include this field, as it’s optional.RAW: encoding is supported, but decoding is not supported
- EC.PublicKey:
RAW.Compressedkey format is not supported
Example¶
val provider = CryptographyProvider.Apple // or CryptographyProvider.Default
// get some algorithm
provider.get(SHA512)
Using in your projects¶
dependencies {
implementation("dev.whyoleg.cryptography:cryptography-provider-apple:0.5.0")
}