Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

I came across this custom function below within the forums.

http://fmforums.com/...e-export-files/

Vigenere ( text, key, decode )

Let ( [

tChar = Left ( text ; 1 ) ;

kChar = Left ( key ; 1 ) ;

tLen = Length ( text ) ;

kLen = Length ( key )

] ;

Char ( Mod ( Code ( tChar ) + Code ( kChar ) * ( not decode - decode ) ; 255 ) )

&

Case ( tLen > 1 ; Vigenere ( Right ( text ; tLen - 1 ) ; Right ( key ; kLen - 1 ) & kChar ; decode ) )

)

If anyone could help, I need the text being encoded to fall within the ascii characters 32 and 126 and for the life of me I can't seem to make this work. All text to be encoded would always fall between ascii characters 32 and 126.

Any help would be greatly appreciated.

Thanks in advance

Stu

The answer depends on what characters are allowed for the plain text and for the key.

  • Author

thanks for the quick reply. the characters for plain text and for the key will always be ascii characters 32 thru126, all the visible characters on a standard keyboard.. thaks again

stu

You need to subtract 32 from the code values of both plaintext and key characters before combining them, and change the divisor value of the Mod() function to 95. This will generate ciphertext in the range of 0 to 94 - which then needs to be shifted up by 32.

  • Author

This is what I came up with. It seems to work.. is this what you meant?

Thanks again Stu

Let ( [

tChar = Left ( text ; 1 ) ;

kChar = Left ( key ; 1 ) ;

tLen = Length ( text ) ;

kLen = Length ( key )

] ;

Char( Mod (((Code ( tChar )-32) + (Code ( kChar )-32)) * ( not decode - decode ); 95 )+32 )

&

Case ( tLen > 1 ; Vigenere ( Right ( text ; tLen - 1 ) ; Right ( key ; kLen - 1 ) & kChar ; decode ) )

)

is this what you meant?

Probably. It would be easier to tell if all the redundant parentheses were removed...

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.