{"id":244,"date":"2018-10-11T18:12:40","date_gmt":"2018-10-11T18:12:40","guid":{"rendered":"https:\/\/help.bmtmicro.com\/vendors\/?page_id=244"},"modified":"2024-12-11T21:46:43","modified_gmt":"2024-12-11T21:46:43","slug":"xml-notifications-encryption","status":"publish","type":"page","link":"https:\/\/help.bmtmicro.com\/vendors\/xml-notifications-encryption\/","title":{"rendered":"XML Notifications Encryption"},"content":{"rendered":"<p style=\"font-size: 14px; letter-spacing: .7px;\"><a href=\"https:\/\/help.bmtmicro.com\/vendors\/xml-help\/\">\u27f5 Back to XML Help<\/a><\/p>\n<p>Some vendors want to ensure that XML requests are coming from us. There are a couple of ways to do this.<\/p>\n<p>First, you can set up a username and password requirement on your end and include the information in the link to automatically log in.<br \/>\n<b>For example: &#8220;https:\/\/user:password@server.mycompany.com\/notification&#8221;<\/b><\/p>\n<p>Second, We can also encrypt the XML when sending to you and you would have to decrypt it on your end before parsing. In order to have our system send encrypted XML notifications, you need to upload a passphrase file under your vendor account. The passphrase can be set to whatever encryption key you decide. Here is some more information regarding encrypted XML notifications:<\/p>\n<p>If a file named <b>XMLRegistrationKey.passphrase<\/b> exists in the vendor&#8217;s file area, the contents of the file will form the pass phrase to encrypt the body of registration key requests.<br \/>\nIf <b>XMLOrderNotification.passphrase exists<\/b>, it will be used to encrypt the body of the order notification request.<\/p>\n<p>The encryption used is Blowfish\/CBC\/PKCS5Padding. The pass phrase is salted with 0x02,0x13,0x33,0x71,0xBA,0x96,0x54,0xAF. After encryption the body is Base64 encoded.<\/p>\n<p><b>NOTE:<\/b> When answering encrypted requests, the reply back should <b>NOT<\/b> be encrypted.<\/p>\n<p>Example of decrypting the message body sent by BMT Micro:<\/p>\n<pre style=\"white-space: pre; margin: 2em 0 2em 0; padding: 10px; overflow: auto; background-color: #f4f9ff; border: 1px solid #dbdef2; font-size: 110%; display: block;\">import java.security.Security;\r\nimport javax.crypto.Cipher;\r\nimport javax.crypto.SecretKey;\r\nimport javax.crypto.spec.IvParameterSpec;\r\nimport javax.crypto.spec.SecretKeySpec;\r\nimport org.apache.commons.codec.binary.Base64;\r\n\r\npublic class BMTBodyDecrypter {\r\n    public static final String decrypt (String stPassPhrase, String stData) throws Exception {\r\n        if (Security.getProvider (\"BC\") == null) {\r\n            Security.addProvider (new org.bouncycastle.jce.provider.BouncyCastleProvider ());\r\n            }\r\n        final byte[] iv = { (byte)0x02, (byte)0x13, (byte)0x33, (byte)0x71, (byte)0xBA, (byte)0x96, (byte)0x54, (byte)0xAF };\r\n        IvParameterSpec salt = new IvParameterSpec (iv);\r\n        SecretKey skeySpec = new SecretKeySpec (stPassPhrase.getBytes (), \"Blowfish\");\r\n        Cipher c = Cipher.getInstance (\"Blowfish\/CBC\/PKCS5Padding\", \"BC\");\r\n        c.init (Cipher.DECRYPT_MODE, skeySpec, salt);\r\n        return (new String (c.doFinal (Base64.decodeBase64 (stData.getBytes ()))));\r\n        }\r\n    } <\/pre>\n<p><\/br><\/p>\n<p style=\"font-size: 14px; letter-spacing: .7px;\"><a href=\"https:\/\/help.bmtmicro.com\/vendors\/xml-help\/\">\u27f5 Back to XML Help<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u27f5 Back to XML Help Some vendors want to ensure that XML requests are coming from us. There are a couple of ways to do this. First, you can set up a username and password requirement on your end and include the information in the link to automatically log in. [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-244","page","type-page","status-publish","hentry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v25.8 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>XML Notifications Encryption - BMT Micro, Inc. Vendor FAQ\/Help<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/help.bmtmicro.com\/vendors\/xml-notifications-encryption\/\" class=\"yoast-seo-meta-tag\" \/>\n<meta property=\"og:locale\" content=\"en_US\" class=\"yoast-seo-meta-tag\" \/>\n<meta property=\"og:type\" content=\"article\" class=\"yoast-seo-meta-tag\" \/>\n<meta property=\"og:title\" content=\"XML Notifications Encryption - BMT Micro, Inc. Vendor FAQ\/Help\" class=\"yoast-seo-meta-tag\" \/>\n<meta property=\"og:description\" content=\"\u27f5 Back to XML Help Some vendors want to ensure that XML requests are coming from us. There are a couple of ways to do this. First, you can set up a username and password requirement on your end and include the information in the link to automatically log in. [&hellip;]\" class=\"yoast-seo-meta-tag\" \/>\n<meta property=\"og:url\" content=\"https:\/\/help.bmtmicro.com\/vendors\/xml-notifications-encryption\/\" class=\"yoast-seo-meta-tag\" \/>\n<meta property=\"og:site_name\" content=\"BMT Micro, Inc. Vendor FAQ\/Help\" class=\"yoast-seo-meta-tag\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/bmt.micro\" class=\"yoast-seo-meta-tag\" \/>\n<meta property=\"article:modified_time\" content=\"2024-12-11T21:46:43+00:00\" class=\"yoast-seo-meta-tag\" \/>\n<meta property=\"og:image\" content=\"https:\/\/help.bmtmicro.com\/vendors\/wp-content\/uploads\/2019\/01\/bmtmicro-logo-600x315.jpg\" class=\"yoast-seo-meta-tag\" \/>\n\t<meta property=\"og:image:width\" content=\"600\" class=\"yoast-seo-meta-tag\" \/>\n\t<meta property=\"og:image:height\" content=\"315\" class=\"yoast-seo-meta-tag\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" class=\"yoast-seo-meta-tag\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" class=\"yoast-seo-meta-tag\" \/>\n<meta name=\"twitter:site\" content=\"@BMTMicro\" class=\"yoast-seo-meta-tag\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" class=\"yoast-seo-meta-tag\" \/>\n\t<meta name=\"twitter:data1\" content=\"2 minutes\" class=\"yoast-seo-meta-tag\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/help.bmtmicro.com\/vendors\/xml-notifications-encryption\/\",\"url\":\"https:\/\/help.bmtmicro.com\/vendors\/xml-notifications-encryption\/\",\"name\":\"XML Notifications Encryption - BMT Micro, Inc. Vendor FAQ\/Help\",\"isPartOf\":{\"@id\":\"https:\/\/help.bmtmicro.com\/vendors\/#website\"},\"datePublished\":\"2018-10-11T18:12:40+00:00\",\"dateModified\":\"2024-12-11T21:46:43+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/help.bmtmicro.com\/vendors\/xml-notifications-encryption\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/help.bmtmicro.com\/vendors\/xml-notifications-encryption\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/help.bmtmicro.com\/vendors\/xml-notifications-encryption\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/help.bmtmicro.com\/vendors\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"XML Notifications Encryption\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/help.bmtmicro.com\/vendors\/#website\",\"url\":\"https:\/\/help.bmtmicro.com\/vendors\/\",\"name\":\"BMT Micro, Inc. Vendor FAQ\/Help\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/help.bmtmicro.com\/vendors\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"XML Notifications Encryption - BMT Micro, Inc. Vendor FAQ\/Help","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/help.bmtmicro.com\/vendors\/xml-notifications-encryption\/","og_locale":"en_US","og_type":"article","og_title":"XML Notifications Encryption - BMT Micro, Inc. Vendor FAQ\/Help","og_description":"\u27f5 Back to XML Help Some vendors want to ensure that XML requests are coming from us. There are a couple of ways to do this. First, you can set up a username and password requirement on your end and include the information in the link to automatically log in. [&hellip;]","og_url":"https:\/\/help.bmtmicro.com\/vendors\/xml-notifications-encryption\/","og_site_name":"BMT Micro, Inc. Vendor FAQ\/Help","article_publisher":"https:\/\/www.facebook.com\/bmt.micro","article_modified_time":"2024-12-11T21:46:43+00:00","og_image":[{"width":600,"height":315,"url":"https:\/\/help.bmtmicro.com\/vendors\/wp-content\/uploads\/2019\/01\/bmtmicro-logo-600x315.jpg","type":"image\/jpeg"}],"twitter_card":"summary_large_image","twitter_site":"@BMTMicro","twitter_misc":{"Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/help.bmtmicro.com\/vendors\/xml-notifications-encryption\/","url":"https:\/\/help.bmtmicro.com\/vendors\/xml-notifications-encryption\/","name":"XML Notifications Encryption - BMT Micro, Inc. Vendor FAQ\/Help","isPartOf":{"@id":"https:\/\/help.bmtmicro.com\/vendors\/#website"},"datePublished":"2018-10-11T18:12:40+00:00","dateModified":"2024-12-11T21:46:43+00:00","breadcrumb":{"@id":"https:\/\/help.bmtmicro.com\/vendors\/xml-notifications-encryption\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/help.bmtmicro.com\/vendors\/xml-notifications-encryption\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/help.bmtmicro.com\/vendors\/xml-notifications-encryption\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/help.bmtmicro.com\/vendors\/"},{"@type":"ListItem","position":2,"name":"XML Notifications Encryption"}]},{"@type":"WebSite","@id":"https:\/\/help.bmtmicro.com\/vendors\/#website","url":"https:\/\/help.bmtmicro.com\/vendors\/","name":"BMT Micro, Inc. Vendor FAQ\/Help","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/help.bmtmicro.com\/vendors\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"}]}},"_links":{"self":[{"href":"https:\/\/help.bmtmicro.com\/vendors\/wp-json\/wp\/v2\/pages\/244","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/help.bmtmicro.com\/vendors\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/help.bmtmicro.com\/vendors\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/help.bmtmicro.com\/vendors\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/help.bmtmicro.com\/vendors\/wp-json\/wp\/v2\/comments?post=244"}],"version-history":[{"count":7,"href":"https:\/\/help.bmtmicro.com\/vendors\/wp-json\/wp\/v2\/pages\/244\/revisions"}],"predecessor-version":[{"id":1803,"href":"https:\/\/help.bmtmicro.com\/vendors\/wp-json\/wp\/v2\/pages\/244\/revisions\/1803"}],"wp:attachment":[{"href":"https:\/\/help.bmtmicro.com\/vendors\/wp-json\/wp\/v2\/media?parent=244"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}