PointyCastle / pointycastle

Moved into the Bouncy Castle project: https://github.com/bcgit/pc-dart
MIT License
270 stars 76 forks source link

No algorithm registered of type Padding with name: PKCS5 #220

Open bineanzhou opened 4 years ago

bineanzhou commented 4 years ago

RegistryFactoryException: No algorithm registered of type Padding with name: PKCS5 I/flutter (20793): #0 _RegistryImpl._createConstructor (package:pointycastle/src/registry/registry.dart:137:5) I/flutter (20793): #1 _RegistryImpl.getConstructor (package:pointycastle/src/registry/registry.dart:108:21) I/flutter (20793): #2 _RegistryImpl.create (package:pointycastle/src/registry/registry.dart:98:42) I/flutter (20793): #3 new Padding (package:pointycastle/src/api/padding.dart:11:16) I/flutter (20793): #4 PaddedBlockCipherImpl.FACTORY_CONFIG.. (package:pointycastle/padded_block_cipher/padded_block_cipher_impl.dart:19:35) I/flutter (20793): #5 _RegistryImpl.create (package:pointycastle/src/registry/registry.dart:99:27) I/flutter (20793): #6 new PaddedBlockCipher (package:pointycastle/src/api/padded_block_cipher.dart:25:16) I/flutter (20793): #7 new AES (package:encrypt/src/algorithms/aes.dart:12:15) I/flutter (20793): #8 new QAESEncrypter (package:qdio_example/encrypt/qaes_encrypter.dart:12:35) I/flutter (20793): #9 MyDao.testEncrypt (package:qdio_example/my_dao.dart:101:35) I/flutter (20793): I/flutter (20793): #10 _MyAppState.build. (package:qdio_example/main.dart:69:23)

richardheap commented 4 years ago

Pointycastle provides the more generic PKCS7 padding which should be compatible.

bineanzhou commented 4 years ago

The server is pcks5, our business needs ~

richardheap commented 4 years ago

There's no difference. What issue are you having using PKCS7?

AKushWarrior commented 4 years ago

pkcs7 is not different from pkcs5; you shouldn't nhave any padding related problems here