类 CtrRSACipherGenerator
java.lang.Object
cn.warpin.thirdPart.huawei.obs.obs.services.crypto.CTRCipherGenerator
cn.warpin.thirdPart.huawei.obs.obs.services.crypto.CtrRSACipherGenerator
-
嵌套类概要
从类继承的嵌套类/接口 cn.warpin.thirdPart.huawei.obs.obs.services.crypto.CTRCipherGenerator
CTRCipherGenerator.SHA256Info -
字段概要
字段修饰符和类型字段说明static final Stringstatic final Stringprivate PrivateKeyprivate PublicKeyprotected static final String从类继承的字段 cn.warpin.thirdPart.huawei.obs.obs.services.crypto.CTRCipherGenerator
AES_ALGORITHM, CRYPTO_IV_BYTES_LEN, CRYPTO_KEY_BYTES_LEN, ENCRYPTED_ALGORITHM_META_NAME, ENCRYPTED_SHA_256_META_NAME, ENCRYPTED_START_META_NAME, MASTER_KEY_INFO_META_NAME, PLAINTEXT_CONTENT_LENGTH_META_NAME, PLAINTEXT_SHA_256_META_NAME, sha256BufferLen -
构造器概要
构造器构造器说明CtrRSACipherGenerator(String masterKeyInfo, boolean needSha256, SecureRandom secureRandom, PrivateKey privateKey, PublicKey publicKey) -
方法概要
修饰符和类型方法说明static PrivateKeyimportPKCS8PrivateKey(String filePath) static PublicKeyimportPublicKey(String filename) byte[]RSADecrypted(byte[] cipherInfo) byte[]RSAEncrypted(byte[] plaintext) voidsetPrivateKey(PrivateKey privateKey) voidsetPublicKey(PublicKey publicKey) 从类继承的方法 cn.warpin.thirdPart.huawei.obs.obs.services.crypto.CTRCipherGenerator
computeSHA256HashAES, getAES256DecryptedStream, getAES256EncryptedStream, getAESEncryptedBytes, getBase64Info, getBytesFromBase64, getCryptoIvBytes, getCryptoKeyBytes, getFileSha256Bytes, getMasterKeyInfo, getRandomBytes, getRandomCryptoIvBytes, getRandomCryptoKeyBytes, getSecureRandom, getSha256BufferLen, isNeedSha256, setBase64AES256Iv, setBase64AES256Key, setCryptoIvBytes, setCryptoKeyBytes, setMasterKeyInfo, setNeedSha256, setSecureRandom, setSha256BufferLen
-
字段详细资料
-
ENCRYPTED_AES_KEY_META_NAME
- 另请参阅:
-
ENCRYPTED_ALGORITHM
- 另请参阅:
-
privateKey
-
publicKey
-
RSA_ALGORITHM
- 另请参阅:
-
-
构造器详细资料
-
CtrRSACipherGenerator
public CtrRSACipherGenerator(String masterKeyInfo, boolean needSha256, SecureRandom secureRandom, PrivateKey privateKey, PublicKey publicKey) throws NoSuchAlgorithmException, InvalidKeySpecException
-
-
方法详细资料
-
importPKCS8PrivateKey
public static PrivateKey importPKCS8PrivateKey(String filePath) throws IOException, NoSuchAlgorithmException, InvalidKeySpecException -
importPublicKey
public static PublicKey importPublicKey(String filename) throws IOException, NoSuchAlgorithmException, InvalidKeySpecException -
RSAEncrypted
public byte[] RSAEncrypted(byte[] plaintext) throws NoSuchPaddingException, NoSuchAlgorithmException, InvalidKeyException, IllegalBlockSizeException, BadPaddingException -
RSADecrypted
public byte[] RSADecrypted(byte[] cipherInfo) throws NoSuchPaddingException, NoSuchAlgorithmException, InvalidKeyException, IllegalBlockSizeException, BadPaddingException -
setPrivateKey
-
setPublicKey
-