File tree Expand file tree Collapse file tree 4 files changed +18
-18
lines changed Expand file tree Collapse file tree 4 files changed +18
-18
lines changed Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ class PKCS7PaddingContext(padding.PaddingContext):
13
13
def update (self , data : bytes ) -> bytes : ...
14
14
def finalize (self ) -> bytes : ...
15
15
16
- class _ANSIX923PaddingContext (padding .PaddingContext ):
16
+ class ANSIX923PaddingContext (padding .PaddingContext ):
17
17
def __init__ (self , block_size : int ) -> None : ...
18
18
def update (self , data : bytes ) -> bytes : ...
19
19
def finalize (self ) -> bytes : ...
@@ -23,7 +23,7 @@ class PKCS7UnpaddingContext(padding.PaddingContext):
23
23
def update (self , data : bytes ) -> bytes : ...
24
24
def finalize (self ) -> bytes : ...
25
25
26
- class _ANSIX923UnpaddingContext (padding .PaddingContext ):
26
+ class ANSIX923UnpaddingContext (padding .PaddingContext ):
27
27
def __init__ (self , block_size : int ) -> None : ...
28
28
def update (self , data : bytes ) -> bytes : ...
29
29
def finalize (self ) -> bytes : ...
Original file line number Diff line number Diff line change 7
7
import abc
8
8
9
9
from cryptography .hazmat .bindings ._rust import (
10
+ ANSIX923PaddingContext ,
11
+ ANSIX923UnpaddingContext ,
10
12
PKCS7PaddingContext ,
11
13
PKCS7UnpaddingContext ,
12
- _ANSIX923PaddingContext ,
13
- _ANSIX923UnpaddingContext ,
14
14
)
15
15
16
16
@@ -58,11 +58,11 @@ def __init__(self, block_size: int):
58
58
self .block_size = block_size
59
59
60
60
def padder (self ) -> PaddingContext :
61
- return _ANSIX923PaddingContext (self .block_size )
61
+ return ANSIX923PaddingContext (self .block_size )
62
62
63
63
def unpadder (self ) -> PaddingContext :
64
- return _ANSIX923UnpaddingContext (self .block_size )
64
+ return ANSIX923UnpaddingContext (self .block_size )
65
65
66
66
67
- PaddingContext .register (_ANSIX923PaddingContext )
68
- PaddingContext .register (_ANSIX923UnpaddingContext )
67
+ PaddingContext .register (ANSIX923PaddingContext )
68
+ PaddingContext .register (ANSIX923UnpaddingContext )
Original file line number Diff line number Diff line change @@ -106,8 +106,8 @@ mod _rust {
106
106
use crate :: oid:: ObjectIdentifier ;
107
107
#[ pymodule_export]
108
108
use crate :: padding:: {
109
- check_ansix923_padding, PKCS7PaddingContext , PKCS7UnpaddingContext ,
110
- _ANSIX923PaddingContext , _ANSIX923UnpaddingContext ,
109
+ check_ansix923_padding, ANSIX923PaddingContext , ANSIX923UnpaddingContext ,
110
+ PKCS7PaddingContext , PKCS7UnpaddingContext ,
111
111
} ;
112
112
#[ pymodule_export]
113
113
use crate :: pkcs12:: pkcs12;
Original file line number Diff line number Diff line change @@ -111,16 +111,16 @@ impl PKCS7PaddingContext {
111
111
}
112
112
113
113
#[ pyo3:: pyclass]
114
- pub ( crate ) struct _ANSIX923PaddingContext {
114
+ pub ( crate ) struct ANSIX923PaddingContext {
115
115
block_size : usize ,
116
116
buffer : Option < Vec < u8 > > ,
117
117
}
118
118
119
119
#[ pyo3:: pymethods]
120
- impl _ANSIX923PaddingContext {
120
+ impl ANSIX923PaddingContext {
121
121
#[ new]
122
- pub ( crate ) fn new ( block_size : usize ) -> _ANSIX923PaddingContext {
123
- _ANSIX923PaddingContext {
122
+ pub ( crate ) fn new ( block_size : usize ) -> ANSIX923PaddingContext {
123
+ ANSIX923PaddingContext {
124
124
block_size : block_size / 8 ,
125
125
buffer : Some ( Vec :: new ( ) ) ,
126
126
}
@@ -226,16 +226,16 @@ impl PKCS7UnpaddingContext {
226
226
}
227
227
228
228
#[ pyo3:: pyclass]
229
- pub ( crate ) struct _ANSIX923UnpaddingContext {
229
+ pub ( crate ) struct ANSIX923UnpaddingContext {
230
230
block_size : usize ,
231
231
buffer : Option < Vec < u8 > > ,
232
232
}
233
233
234
234
#[ pyo3:: pymethods]
235
- impl _ANSIX923UnpaddingContext {
235
+ impl ANSIX923UnpaddingContext {
236
236
#[ new]
237
- pub ( crate ) fn new ( block_size : usize ) -> _ANSIX923UnpaddingContext {
238
- _ANSIX923UnpaddingContext {
237
+ pub ( crate ) fn new ( block_size : usize ) -> ANSIX923UnpaddingContext {
238
+ ANSIX923UnpaddingContext {
239
239
block_size : block_size / 8 ,
240
240
buffer : Some ( Vec :: new ( ) ) ,
241
241
}
You can’t perform that action at this time.
0 commit comments