keyFrom
fun <I : NonceTrait> SymmetricEncryptionAlgorithm<AuthCapability<KeyType.Integrated>, I, KeyType.Integrated>.keyFrom( secretKey: ByteArray): KmmResult<SymmetricKey<AuthCapability<KeyType.Integrated>, I, KeyType.Integrated>>(source)
fun <I : NonceTrait> SymmetricEncryptionAlgorithm<AuthCapability.Authenticated<KeyType.Integrated>, I, KeyType.Integrated>.keyFrom( secretKey: ByteArray): KmmResult<SymmetricKey<AuthCapability.Authenticated.Integrated, I, KeyType.Integrated>>(source)
Creates a SymmetricKey from the specified secretKey. Returns KmmResult.failure in case the provided bytes don't match SymmetricEncryptionAlgorithm.keySize
fun <A : AuthCapability<KeyType.WithDedicatedMacKey>, I : NonceTrait> SymmetricEncryptionAlgorithm<A, I, KeyType.WithDedicatedMacKey>.keyFrom( encryptionKey: ByteArray, macKey: ByteArray): KmmResult<SymmetricKey<A, I, KeyType.WithDedicatedMacKey>>(source)
Creates a SymmetricKey from the specified encryptionKey and macKey. Returns KmmResult.failure in case the provided bytes don't match SymmetricEncryptionAlgorithm.keySize or the specified macKey is empty.