Skip to content
This repository has been archived by the owner on Mar 4, 2024. It is now read-only.

Commit

Permalink
New version: 0_1_24 - can pass device fingerprint in to encrypt function
Browse files Browse the repository at this point in the history
  • Loading branch information
sponglord committed Nov 19, 2018
1 parent 8d7c4e3 commit 9fb78cb
Show file tree
Hide file tree
Showing 11 changed files with 48 additions and 23 deletions.
15 changes: 14 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -171,10 +171,23 @@ var cseInstance = adyenEncrypt.createEncryption(key, options);

# Version History

JavaScript version 0_1_24
-------

* Now possible to send a device fingerprint value to the ```encrypt``` function:

```
var cseInstance = adyen.encrypt.createEncryption(key, options);
cseInstance.encrypt(cardData, dfValue);
```

This can be used in conjunction with the ```stopDeviceFingerprint``` boolean (from *version 0_1_23*) to prevent the CSE from performing device fingerprinting.
Instead it can be performed elsewhere and passed into the CSE.

JavaScript version 0_1_23
-------

* Options object for createEncryption can contain a boolean: 'stopDeviceFingerprint'. If set to true then device fingerprinting will not happen.
* Options object for createEncryption can contain a boolean: ```stopDeviceFingerprint```. If set to ```true``` then device fingerprinting will ***not*** happen.

JavaScript version 0_1_22
-------
Expand Down
2 changes: 1 addition & 1 deletion adyen.encrypt.nodom.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<!-- N.B. Make sure the library is *NOT* loaded in the "head" of the HTML document -->


<script type="text/javascript" src="js/adyen.encrypt.nodom.min.js?0_1_23"></script>
<script type="text/javascript" src="js/adyen.encrypt.nodom.min.js?0_1_24"></script>
<script type="text/javascript">

// the public key
Expand Down
4 changes: 2 additions & 2 deletions adyen.encrypt.simple.html
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@

<!-- How to use the Adyen encryption client-side JS library -->
<!-- N.B. Make sure the library is *NOT* loaded in the "head" of the HTML document -->
<script type="text/javascript" src="js/adyen.encrypt.min.js?0_1_23"></script>
<!-- <script type="text/javascript" src="js/addOns/adyen.cardtype.min.js?0_1_23"></script>-->
<script type="text/javascript" src="js/adyen.encrypt.min.js?0_1_24"></script>
<!-- <script type="text/javascript" src="js/addOns/adyen.cardtype.min.js?0_1_24"></script>-->

<script type="text/javascript">

Expand Down
3 changes: 3 additions & 0 deletions js/addOns/adyen.cardtype.css
Original file line number Diff line number Diff line change
Expand Up @@ -134,4 +134,7 @@
}
#cardType.cse-cardtype-korean_local_card {
background-image: url(https://live.adyen.com/hpp/img/pm/korean_local_card_tiny.png);
}
#cardType.cse-cardtype-forbrugsforeningen {
background-image: url(https://live.adyen.com/hpp/img/pm/forbrugsforeningen.png);
}
7 changes: 4 additions & 3 deletions js/addOns/adyen.cardtype.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/addOns/adyen.cardtype.min.js

Large diffs are not rendered by default.

14 changes: 9 additions & 5 deletions js/adyen.encrypt.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* * Stanford Javascript Crypto Library | http://crypto.stanford.edu/sjcl/
* * JSON in JavaScript | http://www.JSON.org/
*
* Version: 0_1_23
* Version: 0_1_24
* Author: ADYEN (c) 2014
<!DOCTYPE html>
Expand Down Expand Up @@ -62,8 +62,8 @@
<!-- How to use the Adyen encryption client-side JS library -->
<!-- N.B. Make sure the library is *NOT* loaded in the "head" of the HTML document -->
<script type="text/javascript" src="js/adyen.encrypt.min.js?0_1_23"></script>
<!-- <script type="text/javascript" src="js/addOns/adyen.cardtype.min.js?0_1_23"></script>-->
<script type="text/javascript" src="js/adyen.encrypt.min.js?0_1_24"></script>
<!-- <script type="text/javascript" src="js/addOns/adyen.cardtype.min.js?0_1_24"></script>-->
<script type="text/javascript">
Expand Down Expand Up @@ -276,7 +276,7 @@
}


encrypt.version = '0_1_23';
encrypt.version = '0_1_24';


/*
Expand Down Expand Up @@ -574,7 +574,7 @@
*
*/

Encryption.prototype.encrypt = function ( original ) {
Encryption.prototype.encrypt = function ( original, dfValue ) {

var data = {};

Expand Down Expand Up @@ -625,6 +625,10 @@
try {
data.dfValue = df();
} catch (e) {}
}else{
if(dfValue){
data.dfValue = dfValue;
}
}

rsa = this.createRSAKey();
Expand Down
6 changes: 3 additions & 3 deletions js/adyen.encrypt.min.js

Large diffs are not rendered by default.

12 changes: 8 additions & 4 deletions js/adyen.encrypt.nodom.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* * Stanford Javascript Crypto Library | http://crypto.stanford.edu/sjcl/
* * JSON in JavaScript | http://www.JSON.org/
*
* Version: 0_1_23
* Version: 0_1_24
* Author: ADYEN (c) 2014
<!DOCTYPE html>
Expand All @@ -31,7 +31,7 @@
<!-- N.B. Make sure the library is *NOT* loaded in the "head" of the HTML document -->
<script type="text/javascript" src="js/adyen.encrypt.nodom.min.js?0_1_23"></script>
<script type="text/javascript" src="js/adyen.encrypt.nodom.min.js?0_1_24"></script>
<script type="text/javascript">
// the public key
Expand Down Expand Up @@ -193,7 +193,7 @@
encrypt.errors = encrypt.errors || {};


encrypt.version = '0_1_23';
encrypt.version = '0_1_24';



Expand Down Expand Up @@ -445,7 +445,7 @@
*
*/

Encryption.prototype.encrypt = function ( original ) {
Encryption.prototype.encrypt = function ( original, dfValue ) {

var data = {};

Expand Down Expand Up @@ -496,6 +496,10 @@
try {
data.dfValue = df();
} catch (e) {}
}else{
if(dfValue){
data.dfValue = dfValue;
}
}

rsa = this.createRSAKey();
Expand Down
4 changes: 2 additions & 2 deletions js/adyen.encrypt.nodom.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "adyen-cse-js",
"version": "0.1.23",
"version": "0.1.24",
"description": "Adyen javascript client-side encryption library",
"main": "js/adyen.encrypt.nodom.js",
"repository": {
Expand Down

0 comments on commit 9fb78cb

Please sign in to comment.