Package org.eclipse.jgit.transport
Class WalkEncryption.JetS3tV2
- java.lang.Object
-
- org.eclipse.jgit.transport.WalkEncryption
-
- org.eclipse.jgit.transport.WalkEncryption.JetS3tV2
-
- Enclosing class:
- WalkEncryption
static class WalkEncryption.JetS3tV2 extends WalkEncryption
JetS3t compatibility reference: EncryptionUtil.javaNote: EncryptionUtil is inadequate:
- EncryptionUtil.isCipherAvailableForUse checks encryption only which "always works", but in JetS3t both encryption and decryption use non-IV aware algorithm parameters for all PBE specs, which breaks in case of AES
- that means that only non-IV algorithms will work round trip in JetS3t, such as PBEWithMD5AndDES and PBEWithSHAAndTwofish-CBC
- any AES based algorithms such as "PBE...With...And...AES" will not work, since they need proper IV setup
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.eclipse.jgit.transport.WalkEncryption
WalkEncryption.JetS3tV2, WalkEncryption.JGitV1, WalkEncryption.JGitV2, WalkEncryption.Keys, WalkEncryption.SymmetricEncryption, WalkEncryption.Vals
-
-
Field Summary
Fields Modifier and Type Field Description (package private) static java.lang.String
ALGORITHM
private static java.lang.String
CRYPTO_VER
private java.lang.String
cryptoAlg
(package private) static int
ITERATIONS
(package private) static int
KEY_SIZE
private java.security.spec.AlgorithmParameterSpec
paramSpec
(package private) static byte[]
SALT
private javax.crypto.SecretKey
secretKey
(package private) static java.lang.String
VERSION
(package private) static byte[]
ZERO_AES_IV
-
Fields inherited from class org.eclipse.jgit.transport.WalkEncryption
JETS3T_CRYPTO_ALG, JETS3T_CRYPTO_VER, NONE
-
-
Constructor Summary
Constructors Constructor Description JetS3tV2(java.lang.String algo, java.lang.String key)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) java.io.InputStream
decrypt(java.io.InputStream in)
(package private) java.io.OutputStream
encrypt(java.io.OutputStream os)
(package private) void
request(java.net.HttpURLConnection u, java.lang.String prefix)
(package private) void
validate(java.net.HttpURLConnection u, java.lang.String prefix)
-
Methods inherited from class org.eclipse.jgit.transport.WalkEncryption
error, instance, securityError, validateImpl
-
-
-
-
Field Detail
-
VERSION
static final java.lang.String VERSION
- See Also:
- Constant Field Values
-
ALGORITHM
static final java.lang.String ALGORITHM
- See Also:
- Constant Field Values
-
ITERATIONS
static final int ITERATIONS
- See Also:
- Constant Field Values
-
KEY_SIZE
static final int KEY_SIZE
- See Also:
- Constant Field Values
-
SALT
static final byte[] SALT
-
ZERO_AES_IV
static final byte[] ZERO_AES_IV
-
CRYPTO_VER
private static final java.lang.String CRYPTO_VER
- See Also:
- Constant Field Values
-
cryptoAlg
private final java.lang.String cryptoAlg
-
secretKey
private final javax.crypto.SecretKey secretKey
-
paramSpec
private final java.security.spec.AlgorithmParameterSpec paramSpec
-
-
Method Detail
-
request
void request(java.net.HttpURLConnection u, java.lang.String prefix)
- Specified by:
request
in classWalkEncryption
-
validate
void validate(java.net.HttpURLConnection u, java.lang.String prefix) throws java.io.IOException
- Specified by:
validate
in classWalkEncryption
- Throws:
java.io.IOException
-
encrypt
java.io.OutputStream encrypt(java.io.OutputStream os) throws java.io.IOException
- Specified by:
encrypt
in classWalkEncryption
- Throws:
java.io.IOException
-
decrypt
java.io.InputStream decrypt(java.io.InputStream in) throws java.io.IOException
- Specified by:
decrypt
in classWalkEncryption
- Throws:
java.io.IOException
-
-