Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 994291
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T06:33:09+00:00 2026-05-16T06:33:09+00:00

I found the following code to decode a ROT13 string and put it into

  • 0

I found the following code to decode a ROT13 string and put it into a webpage with JavaScript:

<script type="text/javascript">
 document.write("string".replace(/[a-zA-Z]/g, 
 function(c){return String.fromCharCode((c<="Z"?90:122)>=(c=c.charCodeAt(0)+13)?c:c-26);}));
</script>

I need a similar JavaScript code to decode ROT47.

I found a few functions, but I have no idea how to get it into the same script, so it will put the decoded string into a webpage.

One of them is here – http://www.visualco.de/ROTn.js.html

Can someone please help?

Thanks a lot!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T06:33:09+00:00Added an answer on May 16, 2026 at 6:33 am

    Simply copy the needed functions into your JavaScript. At the appropriate place, do

    <script type="text/javascript">
     document.write(ROT47("string"));
    </script>
    

    necessary functions:

    //
    // ROTn.js -- ROT13 and ROT14
    //
    // JavaScript-code   implementing   ROT13  and   ROT47.    Useful  to   obscure
    // email-adresses and telephone numbers from inquisitorial site crawlers.
    //
    // Usage:
    //   <script type="text/javascript">
    //     ROT13('<n uers="znvygb:vasb@ivfhnypb.qr">vasb@ivfhnypb.qr</n>');
    //   </script>
    //
    // Resources:
    //     http://de.wikipedia.org/wiki/ROT13
    //     http://www.drweb.de/magazin/codieren-und-verschlusseln-mit-javascript/
    //
    ////////////////////////////////////////////////
    // (C) 2010 Andreas  Spindler. Permission to use, copy,  modify, and distribute
    // this software and  its documentation for any purpose with  or without fee is
    // hereby  granted.   Redistributions of  source  code  must  retain the  above
    // copyright notice and the following disclaimer.
    //
    // THE SOFTWARE  IS PROVIDED  "AS IS" AND  THE AUTHOR DISCLAIMS  ALL WARRANTIES
    // WITH  REGARD   TO  THIS  SOFTWARE   INCLUDING  ALL  IMPLIED   WARRANTIES  OF
    // MERCHANTABILITY AND FITNESS.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
    // SPECIAL,  DIRECT,   INDIRECT,  OR  CONSEQUENTIAL  DAMAGES   OR  ANY  DAMAGES
    // WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
    // OF  CONTRACT, NEGLIGENCE  OR OTHER  TORTIOUS ACTION,  ARISING OUT  OF  OR IN
    // CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
    // 
    // $Writestamp: 2010-06-09 13:07:07$
    // $Maintained at: www.visualco.de$
    
    function ROTn(text, map) {
      // Generic ROT-n algorithm for keycodes in MAP.
      var R = new String()
      var i, j, c, len = map.length
      for(i = 0; i < text.length; i++) {
        c = text.charAt(i)
        j = map.indexOf(c)
        if (j >= 0) {
          c = map.charAt((j + len / 2) % len)
        }
        R = R + c
      }
      return R;
    }
    
    function ROT47(text) {
      // Hides all ASCII-characters from 33 ("!") to 126 ("~").  Hence can be used
      // to obfuscate virtually any text, including URLs and emails.
      var R = new String()
      R = ROTn(text,
      "!\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~")
      return R;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 513k
  • Answers 513k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Try working in a local 'work' branch. This has advantages… May 16, 2026 at 5:52 pm
  • Editorial Team
    Editorial Team added an answer Is your question "Is this all I need to do… May 16, 2026 at 5:52 pm
  • Editorial Team
    Editorial Team added an answer The grails plugin uses JTwitter. To me Twitter4j looks better,… May 16, 2026 at 5:52 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

I have found the following asp.net code to be very useful when serving files
I found the following code which is working well for a time sheet calculator
When profiling our code I was surprised to find millions of calls to C:\Python26\lib\encodings\utf_8.py:15(decode)
I'm using the WML function providelocalinfo to put location information into Short Messages send
I have the following code: ... sub setImage { my $self=shift; my $filename=shift; unless(-r
Currently I am using the following code: $zipcode = '91762'; $ch = curl_init(); curl_setopt($ch,
I had a need to do a case insensitive find and found the following
The following code gives a compilation error: class parent { parent(int a){} } class
When I came home today I found all my PHP files infected on Godaddy
I'm trying to write my first ever bit of AJAX, reading the public tmeline

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.