This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import javax.crypto.Cipher; | |
import javax.crypto.spec.IvParameterSpec; | |
import javax.crypto.spec.SecretKeySpec; | |
import java.nio.charset.StandardCharsets; | |
import java.security.spec.AlgorithmParameterSpec; | |
import java.util.Base64; | |
public class JavaAes256CbcPkcs7Demo { | |
private static final byte[] keys = new byte[]{0x2e, 0x59, 0x46, (byte) 0x93, 0x2e, (byte) 0xf2, (byte) 0x8b, (byte) 0xed, (byte) 0xcf, (byte) 0xb3, (byte) 0xc4, (byte) 0xda, (byte) 0xc2, 0x53, (byte) 0xe8, (byte) 0xbd, 0x1a, 0x33, 0x17, (byte) 0xf3, 0x35, (byte) 0xca, 0x24, 0x40, (byte) 0xa5, 0x6c, 0x5f, 0x11, 0x11, (byte) 0xfa, 0x2e, 0x1b}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 经纬度计算器 | |
*/ | |
public class LatLonCalculator { | |
/** | |
* 一纬度的距离约为:111.7 km | |
*/ | |
public static final BigDecimal KM_OF_ONE_LAT = new BigDecimal(111.7); |