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

com.amazonaws.encryptionsdk.internal.SignaturePolicy Maven / Gradle / Ivy

package com.amazonaws.encryptionsdk.internal;

import com.amazonaws.encryptionsdk.CryptoAlgorithm;

public enum SignaturePolicy {
    AllowEncryptAllowDecrypt {
        @Override
        public boolean algorithmAllowedForDecrypt(CryptoAlgorithm algorithm) {
            return true;
        }
    },
    AllowEncryptForbidDecrypt {
        @Override
        public boolean algorithmAllowedForDecrypt(CryptoAlgorithm algorithm) {
            return algorithm.getTrailingSignatureLength() == 0;
        }
    };

    public abstract boolean algorithmAllowedForDecrypt(CryptoAlgorithm algorithm);
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy