API Documentation

Here you will find examples on how to use the API for the translator.


All API requests made should be made using POST. the POST field to send data is "data". See examples of how to perform a POST api request. The output returned is in JSON format.

Available API Urls:

  • https://translator.rm-rf.com/api/encode/text/ - Encodes the given text into ASCII85, BASE32, BASE64, BINARY, HEX, DEC, OCT
     
  • https://translator.rm-rf.com/api/decode/bin/ - Decodes the given BINARY data into TEXT, ASCII85, BASE32, BASE64, HEX, DEC, OCT
  • https://translator.rm-rf.com/api/decode/oct/ - Decodes the given OCT data into TEXT, ASCII85, BASE32, BASE64, HEX, BINARY, DEC
  • https://translator.rm-rf.com/api/decode/hex/ - Decodes the given HEX data into TEXT, ASCII85, BASE32, BASE64, DEC, BINARY
  • https://translator.rm-rf.com/api/decode/dec/ - Decodes the given DEC data into TEXT, HEX, BASE32, BASE64, ASCII85, BINARY, OCT
  • https://translator.rm-rf.com/api/decode/base32/ - Decodes the given BASE32 data into TEXT, ASCII85, BASE64, HEX, BINARY, DEC, OCT
  • https://translator.rm-rf.com/api/decode/base64/ - Decodes the given BASE64 data into TEXT, BINARY, ASCII85, BASE32, HEX, DEC, OCT
  • https://translator.rm-rf.com/api/decode/ascii85/ - Decodes the given ASCII85 data into TEXT, HEX, BASE32, BASE64, BINARY, DEC, OCT


Example:
$ curl -d "data=hello world" -X POST https://translator.rm-rf.com/api/encode/text

{
    "ascii85": "BOu!rD]j7BEbo7", 
    "base32": "NBSWY3DPEB3W64TMMQ======", 
    "base64": "aGVsbG8gd29ybGQ=", 
    "bin": "0b110100001100101011011000110110001101111001000000111011101101111011100100110110001100100", 
    "dec": 126207244316550804821666916, 
    "hex": "0x68656c6c6f20776f726c64", 
    "oct": "064145330661571007355734466144", 
    "text_info": {
        "bytes": 11, 
        "lines": 1, 
        "md2": "d9cce882ee690a5c1ce70beff3a78c77", 
        "md4": "aa010fbc1d14c795d86ef98c95479d17", 
        "md5": "5eb63bbbe01eeed093cb22bb8f5acdc3", 
        "sha": "2aae6c35c94fcfb415dbe95f408b9ce91ee846ed", 
        "sha224": "2f05477fc24bb4faefd86517156dafdecec45b8ad3cf2522a563582b", 
        "sha256": "b94d27b9934d3e08a52e52d7da7dabfac484efe37a5380ee9088f7ace2efcde9", 
        "sha384": "fdbd8e75a67f29f701a4e040385e2e23986303ea10239211af907fcbb83578b3e417cb71ce646efd0819dd8c088de1bd", 
        "sha512": "309ecc489c12d6eb4cc40f50c902f2b4d0ed77ee511a7c7a9bcd3ca86d4cd86f989dd35bc5ff499670da34255b45b0cfd830e81f605dcf7dc5542e93ae9cd76f", 
        "words": 2
    }
}
                                    


Example:
$ python
Python 2.7.10 (default, Jul 15 2017, 17:16:57)
Type "help", "copyright", "credits" or "license" for more information.
>>> import requests
>>> r = requests.post("https://translator.rm-rf.com/api/encode/text", data={"data" : "hello world"})
>>> print(r.status_code, r.reason)
(200, 'OK')
>>> print(r.text)

{
    "ascii85": "BOu!rD]j7BEbo7", 
    "base32": "NBSWY3DPEB3W64TMMQ======", 
    "base64": "aGVsbG8gd29ybGQ=", 
    "bin": "0b110100001100101011011000110110001101111001000000111011101101111011100100110110001100100", 
    "dec": 126207244316550804821666916, 
    "hex": "0x68656c6c6f20776f726c64", 
    "oct": "064145330661571007355734466144", 
    "text_info": {
    "bytes": 11,
    "lines": 1, 
    "md2": "d9cce882ee690a5c1ce70beff3a78c77", 
    "md4": "aa010fbc1d14c795d86ef98c95479d17", 
    "md5": "5eb63bbbe01eeed093cb22bb8f5acdc3", 
    "sha": "2aae6c35c94fcfb415dbe95f408b9ce91ee846ed", 
    "sha224": "2f05477fc24bb4faefd86517156dafdecec45b8ad3cf2522a563582b", 
    "sha256": "b94d27b9934d3e08a52e52d7da7dabfac484efe37a5380ee9088f7ace2efcde9", 
    "sha384": "fdbd8e75a67f29f701a4e040385e2e23986303ea10239211af907fcbb83578b3e417cb71ce646efd0819dd8c088de1bd", 
    "sha512": "309ecc489c12d6eb4cc40f50c902f2b4d0ed77ee511a7c7a9bcd3ca86d4cd86f989dd35bc5ff499670da34255b45b0cfd830e81f605dcf7dc5542e93ae9cd76f", 
    "words": 2
    }
}