Given Values: Parameter which should be encrypted KEY to encrypt
Algorithm @>Net 1.1 C#:
- first converts original Parameter to bytesarry (using Unicode little-endian encoding) ->Byte_Expression
- Fillup Byte_Expression with padding chars (0): Fillfactor is 8 (fill up to 8Bytes) -> Byte_Expression8
- Now converts the KEY from String to Base64encoded ByteArray -> ByteKEY
- Crypted Byte_Expression8 with DES3:
- Ciphermode: ECB (Electronic Code Book)
- Padding: with Zeros
- DEFAULTINITIALVECTOR: = {0×00, 0×00, 0×00, 0×00, 0×00, 0×00, 0×00, 0×00}
- Key = ByteKEY (ref 3)
- DES3ecryptedByteArray
- Convert the DES3ecryptedByteArray with Base64Encryption to String -> Encrypted Parameter
- Finish
Have used above Alogorithm @Java7. In ECB Encryption mode it is throwing an error, however it is working fine with CBC mode.
Result : OUTPUT of .Net & Java not is snyc
Issue: java.security.InvalidAlgorithmParameterException: ECB mode cannot use IV