public static CryptoKeyWrapAlgorithm getDefaultKeyWrapAlgorithm(EncryptionMaterials encryptionMaterials) {
        if (encryptionMaterials.isKMSEnabled()) {
            return CryptoKeyWrapAlgorithm.KMS;
        }
        if (encryptionMaterials.getKeyPair() != null) {
            return getDefaultAsymmetricKeyWrapAlgorithm();
        } else {
            return getDefaultSymmetricKeyWrapAlgorithm();
        }
    }
Get the default Key Wrap Algorithm based on the EncryptionMaterials provided
@param encryptionMaterials the encryptionMaterials
@return the default {@link CryptoKeyWrapAlgorithm}
aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/internal/crypto/keywrap/KeyWrapAlgorithmResolver.java