File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -53,8 +53,6 @@ var msrcryptoConcatKdf = (function () {
5353
5454} ( ) ) ;
5555
56- var msrcryptoConcatKdfInstance = null ;
57-
5856if ( typeof operations !== "undefined" ) {
5957
6058 msrcryptoConcatKdf . importKey = function ( p ) {
Original file line number Diff line number Diff line change @@ -57,10 +57,6 @@ var msrcryptoHkdfCtr = (function () {
5757 throw new Error ( "The length provided for HKDF-CTR is too large." ) ;
5858 }
5959
60- // if (labelBytes.length === 0) {
61- // labelBytes = msrcryptoUtilities.getVector(hLen);
62- // }
63-
6460 hmacContext = {
6561 workerid : 0 ,
6662 keyHandle : { algorithm : algorithm } ,
Original file line number Diff line number Diff line change @@ -87,8 +87,6 @@ var msrcryptoHkdf = (function() {
8787
8888} ( ) ) ;
8989
90- var msrcryptoKdfInstance = null ;
91-
9290if ( typeof operations !== "undefined" ) {
9391
9492 msrcryptoHkdf . importKey = function ( p ) {
Original file line number Diff line number Diff line change @@ -104,7 +104,6 @@ var msrcryptoJwk = (function() {
104104 key . alg = algorithmMap [ keyHandle . algorithm . name . toUpperCase ( ) ] ( keyHandle . algorithm ) ;
105105 }
106106 key . key_ops = keyHandle . usages ;
107- //key.key_ops = (keyHandle.type !== "secret") ? getPublicPrivateUsage(key, keyData) : keyHandle.usages;
108107
109108 // Using .pop to determine if a property value is an array.
110109 if ( keyData . pop ) {
@@ -125,14 +124,7 @@ var msrcryptoJwk = (function() {
125124 return key ;
126125 }
127126
128- // function findUsage(usage, usages) {
129- // for (var i = 0; i < usages.length; i++) {
130- // if (usage.toUpperCase() === usages[i].toUpperCase()) { return true; }
131- // }
132- // return false;
133- // }
134-
135- function keyToJwkOld ( keyHandle , keyData ) {
127+ function keyToJwkBytes ( keyHandle , keyData ) {
136128
137129 var key = { } ;
138130
@@ -178,7 +170,7 @@ var msrcryptoJwk = (function() {
178170 }
179171
180172 return {
181- keyToJwkOld : keyToJwkOld ,
173+ keyToJwkBytes : keyToJwkBytes ,
182174 keyToJwk : keyToJwk ,
183175 jwkToKey : jwkToKey
184176 } ;
Original file line number Diff line number Diff line change @@ -97,8 +97,6 @@ var msrcryptoPbkdf2 = (function() {
9797
9898} ( ) ) ;
9999
100- var msrcryptoKdfInstance = null ;
101-
102100if ( typeof operations !== "undefined" ) {
103101
104102 msrcryptoPbkdf2 . importKey = function ( p ) {
Original file line number Diff line number Diff line change @@ -41,12 +41,6 @@ var msrcryptoRsaBase = function(keyStruct) {
4141 var base = group . createElementFromBytes ( dataBytes ) ;
4242 var result = group . modexp ( base , exponent ) ;
4343
44- // var modulus = cryptoMath.bytesToDigits(modulusBytes);
45- // var exponent = cryptoMath.bytesToDigits(expBytes);
46- // var base = cryptoMath.bytesToDigits(dataBytes);
47-
48- // var result = cryptoMath.modExp(base, exponent, modulus);
49-
5044 return result . m_digits ;
5145 }
5246
Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ var msrcryptoWrapKey = (function() {
2828
2929 var tagLength = 128 ;
3030
31- var keyToWrapJwk = msrcryptoJwk . keyToJwkOld ( params . keyHandle , params . keyData ) ;
31+ var keyToWrapJwk = msrcryptoJwk . keyToJwkBytes ( params . keyHandle , params . keyData ) ;
3232
3333 var jweHeader = {
3434 "alg" : params . keyHandle1 . algorithm . name . toUpperCase ( ) ,
You can’t perform that action at this time.
0 commit comments