All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.aliyun.oss.model.DataEncryptionAlgorithm Maven / Gradle / Ivy

There is a newer version: 3.4.2
Show newest version
package com.aliyun.oss.model;

/**
 * Server-side Data Encryption Algorithm.
 */
public enum DataEncryptionAlgorithm {
    SM4("SM4");

    private final String algorithm;

    public String getAlgorithm() {
        return algorithm;
    }

    private DataEncryptionAlgorithm(String algorithm) {
        this.algorithm = algorithm;
    }

    @Override
    public String toString() {
        return algorithm;
    }

    public static DataEncryptionAlgorithm fromString(String algorithm) {
        if (algorithm == null)
            return null;
        for (DataEncryptionAlgorithm e: values()) {
            if (e.getAlgorithm().equals(algorithm))
                return e;
        }
        throw new IllegalArgumentException("Unsupported data encryption algorithm " + algorithm);
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy