File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -142,13 +142,8 @@ function deriveKeyAndNonce(params, mode) {
142142 var keyInfo ;
143143 var nonceInfo ;
144144 if ( padSize === 1 ) {
145- if ( params . authSecret ) {
146- keyInfo = info ( 'aesgcm128' , s . context ) ;
147- nonceInfo = info ( 'nonce' , s . context ) ;
148- } else {
149- keyInfo = 'Content-Encoding: aesgcm128' ;
150- nonceInfo = 'Content-Encoding: nonce' ;
151- }
145+ keyInfo = 'Content-Encoding: aesgcm128' ;
146+ nonceInfo = 'Content-Encoding: nonce' ;
152147 } else if ( padSize === 2 ) {
153148 keyInfo = info ( 'aesgcm' , s . context ) ;
154149 nonceInfo = info ( 'nonce' , s . context ) ;
Original file line number Diff line number Diff line change @@ -67,12 +67,8 @@ def lengthPrefix(key):
6767 keyinfo = buildInfo (b"aesgcm" , context )
6868 nonceinfo = buildInfo (b"nonce" , context )
6969 elif padSize == 1 :
70- if authSecret is not None :
71- keyinfo = buildInfo (b"aesgcm128" , context )
72- nonceinfo = buildInfo (b"nonce" , context )
73- else :
74- keyinfo = b"Content-Encoding: aesgcm128"
75- nonceinfo = b"Content-Encoding: nonce"
70+ keyinfo = b"Content-Encoding: aesgcm128"
71+ nonceinfo = b"Content-Encoding: nonce"
7672 else :
7773 raise Exception (u"unable to set context for padSize=" + str (padSize ))
7874
You can’t perform that action at this time.
0 commit comments