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

com.github.isaichkindanila.crypt.lib.stream.UnsupportedCipherException Maven / Gradle / Ivy

There is a newer version: 1.1.1
Show newest version
package com.github.isaichkindanila.crypt.lib.stream;

import com.github.isaichkindanila.crypt.lib.cipher.StandardStreamCipher;

/**
 * Thrown when ID of stream cipher stored in stream header does not match
 * any of the supported stream ciphers.
 * This can happen if encrypted stream is corrupted or if it was encrypted
 * with stream cipher not supported by this version of Crypt Lib.
 */
@SuppressWarnings("WeakerAccess")
public class UnsupportedCipherException extends RuntimeException {
    UnsupportedCipherException(int index) {
        super(String.format(
                "expected cipher id: [0..%d], actual: %d",
                StandardStreamCipher.values().length - 1, index
        ));
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy