| OLD | NEW |
| 1 """Abstract class for RSA.""" | 1 """Abstract class for RSA.""" |
| 2 | 2 |
| 3 from cryptomath import * | 3 from cryptomath import * |
| 4 | 4 |
| 5 | 5 |
| 6 class RSAKey: | 6 class RSAKey: |
| 7 """This is an abstract base class for RSA keys. | 7 """This is an abstract base class for RSA keys. |
| 8 | 8 |
| 9 Particular implementations of RSA keys, such as | 9 Particular implementations of RSA keys, such as |
| 10 L{OpenSSL_RSAKey.OpenSSL_RSAKey}, | 10 L{OpenSSL_RSAKey.OpenSSL_RSAKey}, |
| (...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 255 else: | 255 else: |
| 256 raise AssertionError() | 256 raise AssertionError() |
| 257 | 257 |
| 258 #NOTE: To be proper, we should add [0,blockType]. However, | 258 #NOTE: To be proper, we should add [0,blockType]. However, |
| 259 #the zero is lost when the returned padding is converted | 259 #the zero is lost when the returned padding is converted |
| 260 #to a number, so we don't even bother with it. Also, | 260 #to a number, so we don't even bother with it. Also, |
| 261 #adding it would cause a misalignment in verify() | 261 #adding it would cause a misalignment in verify() |
| 262 padding = createByteArraySequence([blockType] + pad + [0]) | 262 padding = createByteArraySequence([blockType] + pad + [0]) |
| 263 paddedBytes = padding + bytes | 263 paddedBytes = padding + bytes |
| 264 return paddedBytes | 264 return paddedBytes |
| OLD | NEW |