
top.jfunc.common.crypto.digest.AbstractDigestCrypto Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of common-crypto Show documentation
Show all versions of common-crypto Show documentation
encrypt,decrypt interface implements by symmetric,asymmetric,digester
The newest version!
package top.jfunc.common.crypto.digest;
import top.jfunc.common.crypto.Crypto;
import top.jfunc.common.crypto.CryptoException;
import java.io.InputStream;
import java.io.OutputStream;
/**
* @author xiongshiyan at 2017/12/6
*/
public abstract class AbstractDigestCrypto implements Crypto{
@Override
final public byte[] decrypt(byte[] src) {
unsupported();
return null;
}
@Override
final public String decrypt(String src){
unsupported();
return null;
}
@Override
final public String decrypt(String src, String charset) {
unsupported();
return null;
}
@Override
final public void decrypt(InputStream in, OutputStream out) {
unsupported();
}
private void unsupported(){
throw new CryptoException(new UnsupportedOperationException("摘要算法不支持解密,单向的"));
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy